File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ describe('ReportingLogger', () => {
1111 apiClient = { sendLogToServer : jest . fn ( ) } ;
1212
1313 // Mock location object to allow modifying search property
14- delete ( window as any ) . location ;
15- ( window as any ) . location = {
14+ delete ( globalThis as any ) . location ;
15+ ( globalThis as any ) . location = {
1616 href : 'https://e.com' ,
1717 search : ''
1818 } ;
1919
20- Object . assign ( window , {
20+ Object . assign ( globalThis , {
2121 navigator : { userAgent : 'ua' } ,
2222 mParticle : { config : { isWebSdkLoggingEnabled : true } } ,
2323 ROKT_DOMAIN : 'set'
@@ -48,7 +48,7 @@ describe('ReportingLogger', () => {
4848 } ) ;
4949
5050 it ( 'does not log if ROKT_DOMAIN missing' , ( ) => {
51- delete ( window as any ) . ROKT_DOMAIN ;
51+ delete ( globalThis as any ) . ROKT_DOMAIN ;
5252 logger = new ReportingLogger ( apiClient , sdkVersion ) ;
5353 logger . error ( 'x' ) ;
5454 expect ( apiClient . sendLogToServer ) . not . toHaveBeenCalled ( ) ;
You can’t perform that action at this time.
0 commit comments