Skip to content

Commit

Permalink
ci: fix maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed May 18, 2023
1 parent c612c0b commit 2169818
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/router/__tests__/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,15 @@ export function createDom(options?: ConstructorOptions) {
}
)

// @ts-expect-error: needed for jsdom
global.window = dom.window
global.location = dom.window.location
global.history = dom.window.history
global.document = dom.window.document
try {
// @ts-expect-error: not the same window
global.window = dom.window
global.location = dom.window.location
global.history = dom.window.history
global.document = dom.window.document
} catch (erro) {
// it's okay, some are readonly
}

return dom
}
Expand Down

0 comments on commit 2169818

Please sign in to comment.