File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,14 +234,15 @@ function replaceJunitDuration(str) {
234234// This transform picks only the first line and then the lines from the test
235235// file.
236236function pickTestFileFromLcov ( str ) {
237+ const expectedFile = 'output.js' ;
237238 const lines = str . split ( / \n / ) ;
238239 const firstLineOfTestFile = lines . findIndex (
239- ( line ) => line . startsWith ( 'SF:' ) && line . trim ( ) . endsWith ( 'output.js' ) ,
240+ ( line ) => line . startsWith ( 'SF:' ) && line . trim ( ) . endsWith ( expectedFile ) ,
240241 ) ;
241242
242243 if ( firstLineOfTestFile === - 1 ) {
243244 assert . fail (
244- ' Could not find coverage for test/fixtures/test-runner/output/output.js ' +
245+ ` Could not find LCOV source record ending with ${ expectedFile } ` +
245246 `in LCOV output:\n${ str || '<empty>' } ` ,
246247 ) ;
247248 }
@@ -252,7 +253,7 @@ function pickTestFileFromLcov(str) {
252253
253254 if ( lastLineOfTestFile === - 1 ) {
254255 assert . fail (
255- ' Could not find end_of_record for test/fixtures/test-runner/output/output.js ' +
256+ ` Could not find end_of_record for LCOV source record ending with ${ expectedFile } ` +
256257 `in LCOV output:\n${ str } ` ,
257258 ) ;
258259 }
You can’t perform that action at this time.
0 commit comments