@@ -20,7 +20,7 @@ afterEach(() => {
2020} ) ;
2121
2222it ( 'Returns true when running on interactive environment' , ( ) => {
23- jest . doMock ( 'is-ci ' , ( ) => false ) ;
23+ jest . doMock ( 'ci-info ' , ( ) => ( { isCI : false } ) ) ;
2424 process . stdout . isTTY = true ;
2525 process . env . TERM = 'xterm-256color' ;
2626
@@ -32,32 +32,32 @@ it('Returns false when running on a non-interactive environment', () => {
3232 let isInteractive ;
3333 const expectedResult = false ;
3434
35- // Test with is-ci being true and isTTY false
36- jest . doMock ( 'is-ci ' , ( ) => true ) ;
35+ // Test with isCI being true and isTTY false
36+ jest . doMock ( 'ci-info ' , ( ) => ( { isCI : true } ) ) ;
3737 process . stdout . isTTY = undefined ;
3838 process . env . TERM = 'xterm-256color' ;
3939 isInteractive = require ( '../isInteractive' ) . default ;
4040 expect ( isInteractive ) . toBe ( expectedResult ) ;
4141
42- // Test with is-ci being false and isTTY false
42+ // Test with isCI being false and isTTY false
4343 jest . resetModules ( ) ;
44- jest . doMock ( 'is-ci ' , ( ) => false ) ;
44+ jest . doMock ( 'ci-info ' , ( ) => ( { isCI : false } ) ) ;
4545 process . stdout . isTTY = undefined ;
4646 process . env . TERM = 'xterm-256color' ;
4747 isInteractive = require ( '../isInteractive' ) . default ;
4848 expect ( isInteractive ) . toBe ( expectedResult ) ;
4949
50- // Test with is-ci being true and isTTY true
50+ // Test with isCI being true and isTTY true
5151 jest . resetModules ( ) ;
52- jest . doMock ( 'is-ci ' , ( ) => true ) ;
52+ jest . doMock ( 'ci-info ' , ( ) => ( { isCI : true } ) ) ;
5353 process . stdout . isTTY = true ;
5454 process . env . TERM = 'xterm-256color' ;
5555 isInteractive = require ( '../isInteractive' ) . default ;
5656 expect ( isInteractive ) . toBe ( expectedResult ) ;
5757
5858 // Test with dumb terminal
5959 jest . resetModules ( ) ;
60- jest . doMock ( 'is-ci ' , ( ) => false ) ;
60+ jest . doMock ( 'ci-info ' , ( ) => ( { isCI : false } ) ) ;
6161 process . stdout . isTTY = undefined ;
6262 process . env . TERM = 'dumb' ;
6363 isInteractive = require ( '../isInteractive' ) . default ;
0 commit comments