@@ -37,15 +37,17 @@ function getCoverageFixtureReport() {
37
37
return report ;
38
38
}
39
39
40
- test ( '--test-coverage and --test cannot be combined' , ( ) => {
40
+ test ( '--experimental- test-coverage and --test cannot be combined' , ( ) => {
41
41
// TODO(cjihrig): This test can be removed once multi-process code coverage
42
42
// is supported.
43
- const result = spawnSync ( process . execPath , [ '--test' , '--test-coverage' ] ) ;
43
+ const args = [ '--test' , '--experimental-test-coverage' ] ;
44
+ const result = spawnSync ( process . execPath , args ) ;
44
45
45
46
// 9 is the documented exit code for an invalid CLI argument.
46
47
assert . strictEqual ( result . status , 9 ) ;
47
48
assert . match (
48
- result . stderr . toString ( ) , / - - t e s t - c o v e r a g e c a n n o t b e u s e d w i t h - - t e s t /
49
+ result . stderr . toString ( ) ,
50
+ / - - e x p e r i m e n t a l - t e s t - c o v e r a g e c a n n o t b e u s e d w i t h - - t e s t /
49
51
) ;
50
52
} ) ;
51
53
@@ -55,7 +57,7 @@ test('handles the inspector not being available', (t) => {
55
57
}
56
58
57
59
const fixture = fixtures . path ( 'test-runner' , 'coverage.js' ) ;
58
- const args = [ '--test-coverage' , fixture ] ;
60
+ const args = [ '--experimental- test-coverage' , fixture ] ;
59
61
const result = spawnSync ( process . execPath , args ) ;
60
62
61
63
assert ( ! result . stdout . toString ( ) . includes ( '# start of coverage report' ) ) ;
@@ -70,7 +72,7 @@ test('coverage is reported and dumped to NODE_V8_COVERAGE if present', (t) => {
70
72
}
71
73
72
74
const fixture = fixtures . path ( 'test-runner' , 'coverage.js' ) ;
73
- const args = [ '--test-coverage' , fixture ] ;
75
+ const args = [ '--experimental- test-coverage' , fixture ] ;
74
76
const options = { env : { ...process . env , NODE_V8_COVERAGE : tmpdir . path } } ;
75
77
const result = spawnSync ( process . execPath , args , options ) ;
76
78
const report = getCoverageFixtureReport ( ) ;
@@ -87,7 +89,7 @@ test('coverage is reported without NODE_V8_COVERAGE present', (t) => {
87
89
}
88
90
89
91
const fixture = fixtures . path ( 'test-runner' , 'coverage.js' ) ;
90
- const args = [ '--test-coverage' , fixture ] ;
92
+ const args = [ '--experimental- test-coverage' , fixture ] ;
91
93
const result = spawnSync ( process . execPath , args ) ;
92
94
const report = getCoverageFixtureReport ( ) ;
93
95
0 commit comments