Skip to content

Commit fcdcb67

Browse files
committed
Try that now
1 parent fa88e08 commit fcdcb67

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

gulp/tasks/unit.js

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const { readFile, readdir, stat } = require('fs')
3+
const { readFile } = require('fs')
44
const { promisify } = require('util')
55

66
const { load: loadYaml } = require('js-yaml')
@@ -11,35 +11,23 @@ const gulpExeca = require('../exec')
1111

1212
const TRAVIS_CONFIG = `${__dirname}/../../.travis.yml`
1313

14-
// eslint-disable-next-line max-statements
1514
const unit = async function() {
1615
if (!isCi) {
1716
return gulpExeca('ava')
1817
}
1918

20-
const lcovFile = './coverage/lcov.info'
2119
await pack(
2220
'nyc --include node_modules/log-process-errors --exclude !node_modules/log-process-errors ava',
2321
)
2422

25-
const files = await promisify(readdir)('coverage', { encoding: 'utf-8' })
26-
// eslint-disable-next-line no-console, no-restricted-globals
27-
console.log('Files', files)
28-
29-
const statA = await promisify(stat)(lcovFile)
30-
// eslint-disable-next-line no-console, no-restricted-globals
31-
console.log('Stat', statA.size)
32-
33-
const content = await promisify(readFile)(lcovFile, { encoding: 'utf-8' })
34-
23+
const content = await promisify(readFile)('./coverage/lcov.info', {
24+
encoding: 'utf-8',
25+
})
3526
const contentA = content.replace(
3627
/node_modules(\/|\\)log-process-errors(\/|\\)/gu,
3728
'',
3829
)
3930

40-
// eslint-disable-next-line no-console, no-restricted-globals
41-
console.log('Coverage', contentA)
42-
4331
await gulpExeca('coveralls', { input: contentA })
4432
}
4533

0 commit comments

Comments
 (0)