File tree 2 files changed +6
-7
lines changed
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -84,10 +84,9 @@ class MockLocation {
84
84
}
85
85
}
86
86
87
-
88
87
export default function locationFactory ( url ) {
89
- if ( ! ( 'document' in global ) ) {
90
- global [ "document" ] = { } as Document ;
88
+ if ( ! ( 'document' in globalThis ) ) {
89
+ globalThis [ "document" ] = { } as Document ;
91
90
}
92
- global . document . location = new MockLocation ( url ) as unknown as Location ;
91
+ globalThis . document . location = new MockLocation ( url ) as unknown as Location ;
93
92
}
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ class MockRemote extends RemoteBase implements Remote {
40
40
}
41
41
42
42
locationFactory ( 'https://foo/bar' ) ;
43
- global . localStorageAvailable = localStorageAvailable ;
44
- global [ "sessionStorage" ] = sessionStorage ;
43
+ globalThis . localStorageAvailable = localStorageAvailable ;
44
+ globalThis [ "sessionStorage" ] = sessionStorage ;
45
45
46
46
describe ( "authorization" , ( ) => {
47
47
const sandbox = sinon . createSandbox ( ) ;
@@ -54,7 +54,7 @@ describe("authorization", () => {
54
54
sessionStorage . removeItem ( 'remotestorage:codeVerifier' ) ;
55
55
sessionStorage . removeItem ( 'remotestorage:state' ) ;
56
56
57
- global . document . location . href = 'https://foo/bar' ;
57
+ globalThis . document . location . href = 'https://foo/bar' ;
58
58
} ) ;
59
59
60
60
afterEach ( ( ) => {
You can’t perform that action at this time.
0 commit comments