File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const { promisify } = require('util')
66const { load : loadYaml } = require ( 'js-yaml' )
77const isCi = require ( 'is-ci' )
88
9+ const { name } = require ( '../../package.json' )
910const { getWatchTask, pack } = require ( '../utils' )
1011const gulpExeca = require ( '../exec' )
1112
@@ -17,12 +18,10 @@ const unit = async function() {
1718 }
1819
1920 await pack (
20- ' nyc --include node_modules/log-process-errors --exclude !node_modules/log-process-errors ava' ,
21+ ` nyc --include node_modules/${ name } --exclude !node_modules/${ name } ava` ,
2122 )
2223
23- const content = await promisify ( readFile ) ( './coverage/lcov.info' , {
24- encoding : 'utf-8' ,
25- } )
24+ const content = await promisify ( readFile ) ( COVMAP_PATH , { encoding : 'utf-8' } )
2625 const contentA = content . replace (
2726 / 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,
2827 '' ,
@@ -31,6 +30,8 @@ const unit = async function() {
3130 await gulpExeca ( 'coveralls' , { input : contentA } )
3231}
3332
33+ const COVMAP_PATH = './coverage/lcov.info'
34+
3435// eslint-disable-next-line fp/no-mutation
3536unit . description = 'Run unit tests'
3637
You can’t perform that action at this time.
0 commit comments