@@ -9,7 +9,7 @@ describe("register", () => {
99
1010 beforeAll ( ( ) => {
1111 const { window } = new JSDOM ( )
12- global . window = window as unknown as Window & typeof globalThis
12+ global . window = ( window as unknown ) as Window & typeof globalThis
1313 global . document = window . document
1414 global . navigator = window . navigator
1515 global . location = window . location
@@ -35,10 +35,10 @@ describe("register", () => {
3535 jest . restoreAllMocks ( )
3636
3737 // 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
4242 } )
4343
4444 it ( "test should have access to browser globals from beforeAll" , ( ) => {
@@ -110,7 +110,7 @@ describe("register", () => {
110110 origin : "http://localhost:8080" ,
111111 }
112112 const { window } = new JSDOM ( )
113- global . window = window as unknown as Window & typeof globalThis
113+ global . window = ( window as unknown ) as Window & typeof globalThis
114114 global . document = window . document
115115 global . navigator = window . navigator
116116 global . location = location as Location
@@ -131,10 +131,10 @@ describe("register", () => {
131131 jest . restoreAllMocks ( )
132132
133133 // 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
138138 } )
139139 it ( "should register when options.base is undefined" , async ( ) => {
140140 // Mock getElementById
0 commit comments