File tree Expand file tree Collapse file tree 6 files changed +12
-12
lines changed
Expand file tree Collapse file tree 6 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 11import td from 'testdouble'
22
3- global . context = describe
4- global . td = td
3+ globalThis . context = describe
4+ globalThis . td = td
55
66afterEach ( ( ) => td . reset ( ) )
Original file line number Diff line number Diff line change 1- global . td = require ( '../../..' )
2- global . expect = require ( 'expect' )
1+ globalThis . td = require ( '../../..' )
2+ globalThis . expect = require ( 'expect' )
33
44require ( 'testdouble-jest' ) ( td , jest )
55
Original file line number Diff line number Diff line change 1- global . td = require ( 'testdouble' )
2- global . assert = require ( 'core-assert' )
1+ globalThis . td = require ( 'testdouble' )
2+ globalThis . assert = require ( 'core-assert' )
33
44module . exports = {
55 afterEach : function ( ) {
Original file line number Diff line number Diff line change 11require ( 'ts-node/register' )
2- global . assert = require ( 'assert' )
3- global . ES_SUPPORT = require ( './support/es-support' )
2+ globalThis . assert = require ( 'assert' )
3+ globalThis . ES_SUPPORT = require ( './support/es-support' )
44
55const CallLog = require ( '../src/value/call-log' ) . default
66const StubbingRegister = require ( '../src/value/stubbing-register' ) . default
Original file line number Diff line number Diff line change @@ -43,12 +43,12 @@ module.exports = {
4343 } ,
4444 'when console does not exist' ( ) {
4545 const ogConsole = console
46- delete global . console
46+ delete globalThis . console
4747
4848 subject . warn ( 'lolololol' , 'lol' )
4949
5050 // No explosions occur
51- global . console = ogConsole
51+ globalThis . console = ogConsole
5252 }
5353 } ,
5454 '.error' : {
Original file line number Diff line number Diff line change @@ -7,10 +7,10 @@ module.exports = {
77 test : function ( runTest , metadata , cb ) {
88 if ( metadata . ancestorNames [ 1 ] . indexOf ( '/test/unit/' ) !== - 1 ) {
99 // Unit test -- `td` is a safe npm release so they can mock!
10- global . td = releaseTd
10+ globalThis . td = releaseTd
1111 } else {
1212 // Safe test -- `td` is the current working copy so we can assert it!
13- global . td = workingTd
13+ globalThis . td = workingTd
1414 }
1515 runTest ( cb )
1616 }
You can’t perform that action at this time.
0 commit comments