@@ -9,7 +9,7 @@ describe("register", () => {
9
9
10
10
beforeAll ( ( ) => {
11
11
const { window } = new JSDOM ( )
12
- global . window = ( window as unknown ) as Window & typeof globalThis
12
+ global . window = window as unknown as Window & typeof globalThis
13
13
global . document = window . document
14
14
global . navigator = window . navigator
15
15
global . location = window . location
@@ -35,10 +35,10 @@ describe("register", () => {
35
35
jest . restoreAllMocks ( )
36
36
37
37
// We don't want these to stay around because it can affect other tests
38
- global . window = ( undefined as unknown ) as Window & typeof globalThis
39
- global . document = ( undefined as unknown ) as Document & typeof globalThis
40
- global . navigator = ( undefined as unknown ) as Navigator & typeof globalThis
41
- global . location = ( undefined as unknown ) as Location & typeof globalThis
38
+ global . window = undefined as unknown as Window & typeof globalThis
39
+ global . document = undefined as unknown as Document & typeof globalThis
40
+ global . navigator = undefined as unknown as Navigator & typeof globalThis
41
+ global . location = undefined as unknown as Location & typeof globalThis
42
42
} )
43
43
44
44
it ( "test should have access to browser globals from beforeAll" , ( ) => {
@@ -110,7 +110,7 @@ describe("register", () => {
110
110
origin : "http://localhost:8080" ,
111
111
}
112
112
const { window } = new JSDOM ( )
113
- global . window = ( window as unknown ) as Window & typeof globalThis
113
+ global . window = window as unknown as Window & typeof globalThis
114
114
global . document = window . document
115
115
global . navigator = window . navigator
116
116
global . location = location as Location
@@ -131,10 +131,10 @@ describe("register", () => {
131
131
jest . restoreAllMocks ( )
132
132
133
133
// We don't want these to stay around because it can affect other tests
134
- global . window = ( undefined as unknown ) as Window & typeof globalThis
135
- global . document = ( undefined as unknown ) as Document & typeof globalThis
136
- global . navigator = ( undefined as unknown ) as Navigator & typeof globalThis
137
- global . location = ( undefined as unknown ) as Location & typeof globalThis
134
+ global . window = undefined as unknown as Window & typeof globalThis
135
+ global . document = undefined as unknown as Document & typeof globalThis
136
+ global . navigator = undefined as unknown as Navigator & typeof globalThis
137
+ global . location = undefined as unknown as Location & typeof globalThis
138
138
} )
139
139
it ( "should register when options.base is undefined" , async ( ) => {
140
140
// Mock getElementById
0 commit comments