Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
feedthejim committed Sep 16, 2022
1 parent 5d0a1fa commit 368ddcf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/unit/parse-relative-url.test.ts
Expand Up @@ -16,14 +16,17 @@ const check = (windowUrl, targetUrl, expected) => {
}

describe('parseRelativeUrl', () => {
let previousBrowserValue = process.env.browser
beforeAll(() => {
process.env.browser = 'true'
;(global as any).window = {
location: {},
}
})

afterAll(() => {
delete (global as any).window
process.env.browser = previousBrowserValue
})

it('should parse relative url', () => {
Expand Down

0 comments on commit 368ddcf

Please sign in to comment.