@@ -12,26 +12,26 @@ tmpdir.refresh();
1212
1313describe ( 'node:test bail' , ( ) => {
1414 it ( 'should exit at first failure' , async ( ) => {
15- const child = spawnSync ( process . execPath , [ '--test' , '--test-bail=1' , testFile ] ) ;
16- console . log ( child . stdout . toString ( ) ) ;
15+ const child = spawnSync ( process . execPath , [ '--test' , '--test-bail' , testFile ] ) ;
1716 assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
18- assert . match ( child . stdout . toString ( ) , / T A P v e r s i o n 1 3 / ) ;
19- assert . match ( child . stdout . toString ( ) , / o k 1 - o k / ) ;
20- assert . match ( child . stdout . toString ( ) , / n o t o k 2 - f a i l i n g / ) ;
17+ assert . match ( child . stdout . toString ( ) , / o k 1 - f i r s t / ) ;
18+ assert . match ( child . stdout . toString ( ) , / n o t o k 2 - s e c o n d / ) ;
19+ assert . match ( child . stdout . toString ( ) , / o k 3 - t h i r d / ) ;
2120 assert . match ( child . stdout . toString ( ) , / n o t o k 1 - n e s t e d / ) ;
22- assert . doesNotMatch ( child . stdout . toString ( ) , / n o t o k 2 - t o p l e v e l / ) ;
21+ assert . doesNotMatch ( child . stdout . toString ( ) , / o k 1 - o k f o r t h / ) ;
22+ assert . doesNotMatch ( child . stdout . toString ( ) , / n o t o k 2 - f i f t h / ) ;
2323 assert . doesNotMatch ( child . stdout . toString ( ) , / S u b t e s t : t o p l e v e l / ) ;
2424 } ) ;
2525
26- it ( 'should exit at second failure' , async ( ) => {
27- const child = spawnSync ( process . execPath , [ '--test' , '--test-bail=2' , testFile ] ) ;
28- console . log ( child . stdout . toString ( ) ) ;
26+ it ( 'should exit not exit if bail isnt set' , async ( ) => {
27+ const child = spawnSync ( process . execPath , [ '--test' , testFile ] ) ;
2928 assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
30- assert . match ( child . stdout . toString ( ) , / T A P v e r s i o n 1 3 / ) ;
31- assert . match ( child . stdout . toString ( ) , / o k 1 - o k / ) ;
32- assert . match ( child . stdout . toString ( ) , / n o t o k 2 - f a i l i n g / ) ;
29+ assert . match ( child . stdout . toString ( ) , / o k 1 - f i r s t / ) ;
30+ assert . match ( child . stdout . toString ( ) , / n o t o k 2 - s e c o n d / ) ;
31+ assert . match ( child . stdout . toString ( ) , / n o t o k 3 - t h i r d / ) ;
3332 assert . match ( child . stdout . toString ( ) , / n o t o k 1 - n e s t e d / ) ;
34- assert . match ( child . stdout . toString ( ) , / n o t o k 2 - f a i l i n g / ) ;
35- assert . match ( child . stdout . toString ( ) , / S u b t e s t : t o p l e v e l / ) ;
33+ assert . match ( child . stdout . toString ( ) , / o k 1 - f o r t h / ) ;
34+ assert . match ( child . stdout . toString ( ) , / n o t o k 2 - f i f t h / ) ;
35+ assert . match ( child . stdout . toString ( ) , / n o t o k 2 - t o p l e v e l / ) ;
3636 } ) ;
3737} ) ;
0 commit comments