mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-25 20:01:45 +00:00
27 lines
801 B
TypeScript
27 lines
801 B
TypeScript
import { updateOfferThroughputBeyondLimit } from "./updateOfferThroughputBeyondLimit";
|
|
|
|
describe("updateOfferThroughputBeyondLimit", () => {
|
|
it("should call fetch", async () => {
|
|
window.fetch = jest.fn(() => {
|
|
return {
|
|
ok: true
|
|
};
|
|
});
|
|
window.dataExplorer = {
|
|
logConsoleData: jest.fn(),
|
|
deleteInProgressConsoleDataWithId: jest.fn(),
|
|
extensionEndpoint: jest.fn()
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
} as any;
|
|
await updateOfferThroughputBeyondLimit({
|
|
subscriptionId: "foo",
|
|
resourceGroup: "foo",
|
|
databaseAccountName: "foo",
|
|
databaseName: "foo",
|
|
throughput: 1000000000,
|
|
offerIsRUPerMinuteThroughputEnabled: false
|
|
});
|
|
expect(window.fetch).toHaveBeenCalled();
|
|
});
|
|
});
|