File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -170,4 +170,25 @@ for (const coverage of coverages) {
170170 assert . strictEqual ( result . status , 1 ) ;
171171 assert ( ! findCoverageFileForPid ( result . pid ) ) ;
172172 } ) ;
173+
174+ test ( `test failing ${ coverage . flag } with dot reporter` , ( ) => {
175+ const result = spawnSync ( process . execPath , [
176+ '--test' ,
177+ '--experimental-test-coverage' ,
178+ '--test-coverage-exclude=!test/**' ,
179+ `${ coverage . flag } =99` ,
180+ '--test-reporter' , 'dot' ,
181+ fixture ,
182+ ] ) ;
183+
184+ const stdout = result . stdout . toString ( ) ;
185+ assert . match (
186+ stdout ,
187+ RegExp ( `Error: ${ coverage . actual . toFixed ( 2 ) } % ${ coverage . name } coverage does not meet threshold of 99%` )
188+ ) ;
189+ assert . match ( stdout , / s t a r t o f c o v e r a g e r e p o r t / ) ;
190+ assert . match ( stdout , / e n d o f c o v e r a g e r e p o r t / ) ;
191+ assert . strictEqual ( result . status , 1 ) ;
192+ assert ( ! findCoverageFileForPid ( result . pid ) ) ;
193+ } ) ;
173194}
You can’t perform that action at this time.
0 commit comments