@@ -41,7 +41,8 @@ async function testWatch({ fileToUpdate, file, action = 'update' }) {
4141 const ran1 = util . createDeferredPromise ( ) ;
4242 const ran2 = util . createDeferredPromise ( ) ;
4343 const child = spawn ( process . execPath ,
44- [ '--watch' , '--test' , file ? fixturePaths [ file ] : undefined ] . filter ( Boolean ) ,
44+ [ '--watch' , '--test' , '--test-reporter=spec' ,
45+ file ? fixturePaths [ file ] : undefined ] . filter ( Boolean ) ,
4546 { encoding : 'utf8' , stdio : 'pipe' , cwd : tmpdir . path } ) ;
4647 let stdout = '' ;
4748 let currentRun = '' ;
@@ -50,7 +51,7 @@ async function testWatch({ fileToUpdate, file, action = 'update' }) {
5051 child . stdout . on ( 'data' , ( data ) => {
5152 stdout += data . toString ( ) ;
5253 currentRun += data . toString ( ) ;
53- const testRuns = stdout . match ( / # d u r a t i o n _ m s \s \d + / g) ;
54+ const testRuns = stdout . match ( / d u r a t i o n _ m s \s \d + / g) ;
5455 if ( testRuns ?. length >= 1 ) ran1 . resolve ( ) ;
5556 if ( testRuns ?. length >= 2 ) ran2 . resolve ( ) ;
5657 } ) ;
@@ -71,10 +72,10 @@ async function testWatch({ fileToUpdate, file, action = 'update' }) {
7172 assert . strictEqual ( runs . length , 2 ) ;
7273
7374 for ( const run of runs ) {
74- assert . match ( run , / # t e s t s 1 / ) ;
75- assert . match ( run , / # p a s s 1 / ) ;
76- assert . match ( run , / # f a i l 0 / ) ;
77- assert . match ( run , / # c a n c e l l e d 0 / ) ;
75+ assert . match ( run , / t e s t s 1 / ) ;
76+ assert . match ( run , / p a s s 1 / ) ;
77+ assert . match ( run , / f a i l 0 / ) ;
78+ assert . match ( run , / c a n c e l l e d 0 / ) ;
7879 }
7980 } ;
8081
@@ -94,10 +95,10 @@ async function testWatch({ fileToUpdate, file, action = 'update' }) {
9495 assert . strictEqual ( runs . length , 2 ) ;
9596
9697 for ( const run of runs ) {
97- assert . match ( run , / # t e s t s 1 / ) ;
98- assert . match ( run , / # p a s s 1 / ) ;
99- assert . match ( run , / # f a i l 0 / ) ;
100- assert . match ( run , / # c a n c e l l e d 0 / ) ;
98+ assert . match ( run , / t e s t s 1 / ) ;
99+ assert . match ( run , / p a s s 1 / ) ;
100+ assert . match ( run , / f a i l 0 / ) ;
101+ assert . match ( run , / c a n c e l l e d 0 / ) ;
101102 }
102103 } ;
103104
0 commit comments