Skip to content

Commit 6baebc3

Browse files
committed
Try this right now
1 parent fcdcb67 commit 6baebc3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

gulp/tasks/unit.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const { promisify } = require('util')
66
const { load: loadYaml } = require('js-yaml')
77
const isCi = require('is-ci')
88

9+
const { name } = require('../../package.json')
910
const { getWatchTask, pack } = require('../utils')
1011
const 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
/node_modules(\/|\\)log-process-errors(\/|\\)/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
3536
unit.description = 'Run unit tests'
3637

0 commit comments

Comments
 (0)