Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ declare module "replicate" {
created_by: Account;
configuration: {
hardware: string;
scaling: {
min_instances: number;
max_instances: number;
};
min_instances: number;
max_instances: number;
};
};
}
Expand Down
28 changes: 9 additions & 19 deletions index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -791,10 +791,8 @@ describe("Replicate client", () => {
},
configuration: {
hardware: "gpu-t4",
scaling: {
min_instances: 1,
max_instances: 5,
},
min_instances: 1,
max_instances: 5,
},
},
});
Expand Down Expand Up @@ -832,10 +830,8 @@ describe("Replicate client", () => {
},
configuration: {
hardware: "gpu-t4",
scaling: {
min_instances: 1,
max_instances: 5,
},
min_instances: 1,
max_instances: 5,
},
},
});
Expand Down Expand Up @@ -878,10 +874,8 @@ describe("Replicate client", () => {
},
configuration: {
hardware: "gpu-a40-large",
scaling: {
min_instances: 3,
max_instances: 10,
},
min_instances: 3,
max_instances: 10,
},
},
});
Expand All @@ -905,12 +899,8 @@ describe("Replicate client", () => {
expect(deployment.current_release.configuration.hardware).toBe(
"gpu-a40-large"
);
expect(
deployment.current_release.configuration.scaling?.min_instances
).toBe(3);
expect(
deployment.current_release.configuration.scaling?.max_instances
).toBe(10);
expect(deployment.current_release.configuration.min_instances).toBe(3);
expect(deployment.current_release.configuration.max_instances).toBe(10);
});
// Add more tests for error handling, edge cases, etc.
});
Expand All @@ -935,7 +925,7 @@ describe("Replicate client", () => {
});

const deployments = await client.deployments.list();
expect(deployments.results.length).toBe(1)
expect(deployments.results.length).toBe(1);
});
// Add more tests for pagination, error handling, edge cases, etc.
});
Expand Down