@@ -23,6 +23,10 @@ const expectedStateFile = [
2323 'test/fixtures/test-runner/rerun.js:39:1' : { passed_on_attempt : 0 , name : 'nested ambiguous (expectedAttempts=0)' } ,
2424 'test/fixtures/test-runner/rerun.js:30:16:(1)' : { passed_on_attempt : 0 , name : '2 levels deep' } ,
2525 'test/fixtures/test-runner/rerun.js:35:13:(1)' : { passed_on_attempt : 0 , name : 'ok' } ,
26+ 'test/fixtures/test-runner/rerun.js:45:13' : { passed_on_attempt : 0 , name : 'nested' } ,
27+ 'test/fixtures/test-runner/rerun.js:44:3' : { passed_on_attempt : 0 , name : 'passed on first attempt' } ,
28+ 'test/fixtures/test-runner/rerun.js:47:3' : { passed_on_attempt : 0 , name : 'a' } ,
29+ 'test/fixtures/test-runner/rerun.js:43:1' : { passed_on_attempt : 0 , name : 'describe rerun' } ,
2630 } ,
2731 {
2832 'test/fixtures/test-runner/rerun.js:9:1' : { passed_on_attempt : 0 , name : 'ok' } ,
@@ -34,6 +38,11 @@ const expectedStateFile = [
3438 'test/fixtures/test-runner/rerun.js:39:1' : { passed_on_attempt : 0 , name : 'nested ambiguous (expectedAttempts=0)' } ,
3539 'test/fixtures/test-runner/rerun.js:30:16:(1)' : { passed_on_attempt : 0 , name : '2 levels deep' } ,
3640 'test/fixtures/test-runner/rerun.js:35:13:(1)' : { passed_on_attempt : 0 , name : 'ok' } ,
41+ 'test/fixtures/test-runner/rerun.js:43:1' : { passed_on_attempt : 0 , name : 'describe rerun' } ,
42+ 'test/fixtures/test-runner/rerun.js:44:3' : { passed_on_attempt : 0 , name : 'passed on first attempt' } ,
43+ 'test/fixtures/test-runner/rerun.js:45:13' : { passed_on_attempt : 0 , name : 'nested' } ,
44+ 'test/fixtures/test-runner/rerun.js:45:13:(1)' : { passed_on_attempt : 1 , name : 'nested' } ,
45+ 'test/fixtures/test-runner/rerun.js:47:3' : { passed_on_attempt : 0 , name : 'a' } ,
3746 } ,
3847 {
3948 'test/fixtures/test-runner/rerun.js:3:1' : { passed_on_attempt : 2 , name : 'should fail on first two attempts' } ,
@@ -48,6 +57,11 @@ const expectedStateFile = [
4857 'test/fixtures/test-runner/rerun.js:30:16:(1)' : { passed_on_attempt : 0 , name : '2 levels deep' } ,
4958 'test/fixtures/test-runner/rerun.js:35:13:(1)' : { passed_on_attempt : 0 , name : 'ok' } ,
5059 'test/fixtures/test-runner/rerun.js:40:1' : { passed_on_attempt : 2 , name : 'nested ambiguous (expectedAttempts=1)' } ,
60+ 'test/fixtures/test-runner/rerun.js:43:1' : { passed_on_attempt : 0 , name : 'describe rerun' } ,
61+ 'test/fixtures/test-runner/rerun.js:44:3' : { passed_on_attempt : 0 , name : 'passed on first attempt' } ,
62+ 'test/fixtures/test-runner/rerun.js:45:13' : { passed_on_attempt : 0 , name : 'nested' } ,
63+ 'test/fixtures/test-runner/rerun.js:45:13:(1)' : { passed_on_attempt : 1 , name : 'nested' } ,
64+ 'test/fixtures/test-runner/rerun.js:47:3' : { passed_on_attempt : 0 , name : 'a' } ,
5165 } ,
5266] ;
5367
@@ -67,23 +81,26 @@ test('test should pass on third rerun', async () => {
6781 let { code, stdout, signal } = await common . spawnPromisified ( process . execPath , args ) ;
6882 assert . strictEqual ( code , 1 ) ;
6983 assert . strictEqual ( signal , null ) ;
70- assert . match ( stdout , / p a s s 8 / ) ;
84+ assert . match ( stdout , / p a s s 1 1 / ) ;
7185 assert . match ( stdout , / f a i l 4 / ) ;
86+ assert . match ( stdout , / s u i t e s 1 / ) ;
7287 assert . deepStrictEqual ( await getStateFile ( ) , expectedStateFile . slice ( 0 , 1 ) ) ;
7388
7489 ( { code, stdout, signal } = await common . spawnPromisified ( process . execPath , args ) ) ;
7590 assert . strictEqual ( code , 1 ) ;
7691 assert . strictEqual ( signal , null ) ;
77- assert . match ( stdout , / p a s s 9 / ) ;
92+ assert . match ( stdout , / p a s s 1 3 / ) ;
7893 assert . match ( stdout , / f a i l 3 / ) ;
94+ assert . match ( stdout , / s u i t e s 1 / ) ;
7995 assert . deepStrictEqual ( await getStateFile ( ) , expectedStateFile . slice ( 0 , 2 ) ) ;
8096
8197
8298 ( { code, stdout, signal } = await common . spawnPromisified ( process . execPath , args ) ) ;
8399 assert . strictEqual ( code , 0 ) ;
84100 assert . strictEqual ( signal , null ) ;
85- assert . match ( stdout , / p a s s 1 2 / ) ;
101+ assert . match ( stdout , / p a s s 1 8 / ) ;
86102 assert . match ( stdout , / f a i l 0 / ) ;
103+ assert . match ( stdout , / s u i t e s 1 / ) ;
87104 assert . deepStrictEqual ( await getStateFile ( ) , expectedStateFile ) ;
88105} ) ;
89106
@@ -93,29 +110,32 @@ test('test should pass on third rerun with `--test`', async () => {
93110 let { code, stdout, signal } = await common . spawnPromisified ( process . execPath , args ) ;
94111 assert . strictEqual ( code , 1 ) ;
95112 assert . strictEqual ( signal , null ) ;
96- assert . match ( stdout , / p a s s 8 / ) ;
113+ assert . match ( stdout , / p a s s 1 1 / ) ;
97114 assert . match ( stdout , / f a i l 4 / ) ;
115+ assert . match ( stdout , / s u i t e s 1 / ) ;
98116 assert . deepStrictEqual ( await getStateFile ( ) , expectedStateFile . slice ( 0 , 1 ) ) ;
99117
100118 ( { code, stdout, signal } = await common . spawnPromisified ( process . execPath , args ) ) ;
101119 assert . strictEqual ( code , 1 ) ;
102120 assert . strictEqual ( signal , null ) ;
103- assert . match ( stdout , / p a s s 9 / ) ;
121+ assert . match ( stdout , / p a s s 1 3 / ) ;
104122 assert . match ( stdout , / f a i l 3 / ) ;
123+ assert . match ( stdout , / s u i t e s 1 / ) ;
105124 assert . deepStrictEqual ( await getStateFile ( ) , expectedStateFile . slice ( 0 , 2 ) ) ;
106125
107126
108127 ( { code, stdout, signal } = await common . spawnPromisified ( process . execPath , args ) ) ;
109128 assert . strictEqual ( code , 0 ) ;
110129 assert . strictEqual ( signal , null ) ;
111- assert . match ( stdout , / p a s s 1 2 / ) ;
130+ assert . match ( stdout , / p a s s 1 8 / ) ;
112131 assert . match ( stdout , / f a i l 0 / ) ;
132+ assert . match ( stdout , / s u i t e s 1 / ) ;
113133 assert . deepStrictEqual ( await getStateFile ( ) , expectedStateFile ) ;
114134} ) ;
115135
116136test ( 'using `run` api' , async ( ) => {
117137 let stream = run ( { files : [ fixture ] , rerunFailuresFilePath : stateFile } ) ;
118- stream . on ( 'test:pass' , common . mustCall ( 8 ) ) ;
138+ stream . on ( 'test:pass' , common . mustCall ( 12 ) ) ;
119139 stream . on ( 'test:fail' , common . mustCall ( 4 ) ) ;
120140
121141 // eslint-disable-next-line no-unused-vars
@@ -125,7 +145,7 @@ test('using `run` api', async () => {
125145
126146
127147 stream = run ( { files : [ fixture ] , rerunFailuresFilePath : stateFile } ) ;
128- stream . on ( 'test:pass' , common . mustCall ( 9 ) ) ;
148+ stream . on ( 'test:pass' , common . mustCall ( 14 ) ) ;
129149 stream . on ( 'test:fail' , common . mustCall ( 3 ) ) ;
130150
131151 // eslint-disable-next-line no-unused-vars
@@ -135,7 +155,7 @@ test('using `run` api', async () => {
135155
136156
137157 stream = run ( { files : [ fixture ] , rerunFailuresFilePath : stateFile } ) ;
138- stream . on ( 'test:pass' , common . mustCall ( 12 ) ) ;
158+ stream . on ( 'test:pass' , common . mustCall ( 19 ) ) ;
139159 stream . on ( 'test:fail' , common . mustNotCall ( ) ) ;
140160
141161 // eslint-disable-next-line no-unused-vars
0 commit comments