Skip to content

Commit 1a1ef8a

Browse files
committed
test(): update test usage after upgrade jest to v30
1 parent e1e61a7 commit 1a1ef8a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/runtime/src/internal/secret_internals.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,12 +1403,12 @@ describe("debugDataValue", () => {
14031403

14041404
describe("getLegalRuntimeValue", () => {
14051405
const originLocation = window.location;
1406-
1406+
delete (window as any).location;
14071407
window.location = {
1408-
href: "https://dev-easyops.cn/home/Host",
1409-
origin: "https://dev-easyops.cn",
1410-
hostname: "admin.easyops.local",
1411-
host: "admin.easyops.local",
1408+
href: "http://localhost/",
1409+
origin: "http://localhost",
1410+
hostname: "localhost",
1411+
host: "localhost",
14121412
} as any;
14131413

14141414
jest.spyOn(routeMatchedMap, "getMatchedRoute").mockReturnValueOnce({
@@ -1452,5 +1452,5 @@ describe("getLegalRuntimeValue", () => {
14521452
query: {},
14531453
sys: { org: 8888, username: "easyops" },
14541454
});
1455-
window.location = originLocation;
1455+
(window as any).location = originLocation;
14561456
});

0 commit comments

Comments
 (0)