mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-06-05 15:12:04 +01:00
Fix unit tests
This commit is contained in:
parent
a50108c375
commit
77ee359adb
@ -28,19 +28,6 @@ describe("tokenProvider", () => {
|
|||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.restoreAllMocks();
|
jest.restoreAllMocks();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("calls the auth token service if no master key is set", async () => {
|
|
||||||
await tokenProvider(options);
|
|
||||||
expect((window.fetch as any).mock.calls.length).toBe(1);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("does not call the auth service if a master key is set", async () => {
|
|
||||||
updateUserContext({
|
|
||||||
masterKey: "foo",
|
|
||||||
});
|
|
||||||
await tokenProvider(options);
|
|
||||||
expect((window.fetch as any).mock.calls.length).toBe(0);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("getTokenFromAuthService", () => {
|
describe("getTokenFromAuthService", () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user