File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,16 @@ const unit = async function() {
2121 `nyc --include node_modules/${ name } --exclude !node_modules/${ name } ava` ,
2222 )
2323
24- const content = await promisify ( readFile ) ( COVMAP_PATH , { encoding : 'utf-8' } )
25- const contentA = content . replace (
26- / n o d e _ m o d u l e s ( \/ | \\ ) l o g - p r o c e s s - e r r o r s ( \/ | \\ ) / gu,
27- '' ,
28- )
24+ const covMap = await promisify ( readFile ) ( COVMAP_PATH , { encoding : 'utf-8' } )
25+ const covMapA = covMap . replace ( NESTED_REGEXP , '' )
2926
30- await gulpExeca ( 'coveralls' , { input : contentA } )
27+ await gulpExeca ( 'coveralls' , { input : covMapA } )
3128}
3229
30+ const NESTED_REGEXP = new RegExp (
31+ `node_modules(\\/|\\\\)${ name } (\\/|\\\\)` ,
32+ 'gu' ,
33+ )
3334const COVMAP_PATH = './coverage/lcov.info'
3435
3536// eslint-disable-next-line fp/no-mutation
You can’t perform that action at this time.
0 commit comments