Skip to content

Commit d2ec3bb

Browse files
committed
aut thests
1 parent c9f4ebe commit d2ec3bb

File tree

1 file changed

+1
-37
lines changed

1 file changed

+1
-37
lines changed

frontend/src/tests/lib/utils/auth.utils.spec.ts

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import {
2-
getIdentityProviderUrl,
3-
isSignedIn,
4-
loadIdentity,
5-
} from "$lib/utils/auth.utils";
1+
import { isSignedIn, loadIdentity } from "$lib/utils/auth.utils";
62
import { mockIdentity } from "$tests/mocks/auth.store.mock";
73
import { AuthClient } from "@icp-sdk/auth/client";
84
import { mock } from "vitest-mock-extended";
@@ -59,36 +55,4 @@ describe("auth-utils", () => {
5955
});
6056
});
6157
});
62-
describe("getIdentityProviderUrl", () => {
63-
it("should return old mainnet identity from ic0.app", async () => {
64-
Object.defineProperty(window, "location", {
65-
writable: true,
66-
value: { host: "nns.ic0.app" },
67-
});
68-
69-
expect(await getIdentityProviderUrl()).toEqual(
70-
"https://identity.ic0.app"
71-
);
72-
});
73-
74-
it("should return old mainnet identity from ic0.app", async () => {
75-
Object.defineProperty(window, "location", {
76-
writable: true,
77-
value: { host: "qoctq-giaaa-aaaaa-aaaea-cai.ic0.app" },
78-
});
79-
80-
expect(await getIdentityProviderUrl()).toEqual(
81-
"https://identity.ic0.app"
82-
);
83-
});
84-
85-
it("should return IDENTITY_SERVICE_URL when not old mainnet", async () => {
86-
Object.defineProperty(window, "location", {
87-
writable: true,
88-
value: { host: "nns.internetcomputer.org" },
89-
});
90-
91-
expect(await getIdentityProviderUrl()).toEqual("http://localhost:8000/");
92-
});
93-
});
9458
});

0 commit comments

Comments
 (0)