Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cca2c1f

Browse files
committedJul 13, 2021
fixup! remove globals in test
1 parent b0e3220 commit cca2c1f

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed
 

‎test/unit/browser/pages/vscode.test.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -177,33 +177,6 @@ describe("vscode", () => {
177177
})
178178
})
179179
describe("registerRequireOnSelf", () => {
180-
beforeAll(() => {
181-
const { window } = new JSDOM()
182-
// @ts-expect-error We know these are the exact same type
183-
// but we need to do this for the test to work
184-
global.self = window.self
185-
global.window = window as unknown as Window & typeof globalThis
186-
global.document = window.document
187-
global.navigator = window.navigator
188-
global.location = location as Location
189-
})
190-
191-
beforeEach(() => {
192-
jest.clearAllMocks()
193-
})
194-
195-
afterEach(() => {
196-
jest.resetModules()
197-
})
198-
199-
afterAll(() => {
200-
jest.restoreAllMocks()
201-
202-
global.window = undefined as unknown as Window & typeof globalThis
203-
global.document = undefined as unknown as Document & typeof globalThis
204-
global.navigator = undefined as unknown as Navigator & typeof globalThis
205-
global.location = undefined as unknown as Location & typeof globalThis
206-
})
207180
it("should throw an error if self is undefined", () => {
208181
const options = {
209182
base: "/",

0 commit comments

Comments
 (0)
Please sign in to comment.