|
1 | | -import { |
2 | | - getIdentityProviderUrl, |
3 | | - isSignedIn, |
4 | | - loadIdentity, |
5 | | -} from "$lib/utils/auth.utils"; |
| 1 | +import { isSignedIn, loadIdentity } from "$lib/utils/auth.utils"; |
6 | 2 | import { mockIdentity } from "$tests/mocks/auth.store.mock"; |
7 | 3 | import { AuthClient } from "@icp-sdk/auth/client"; |
8 | 4 | import { mock } from "vitest-mock-extended"; |
@@ -59,36 +55,4 @@ describe("auth-utils", () => { |
59 | 55 | }); |
60 | 56 | }); |
61 | 57 | }); |
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 | | - }); |
94 | 58 | }); |
0 commit comments