Skip to content

Commit

Permalink
chore: removed fixture and tests for unsupported versions of c8 < 10
Browse files Browse the repository at this point in the history
This was breaking the lib/report.js since it now relies on either `fs/promises` or `fs.promises` depending on the version of Node.js.
  • Loading branch information
bizob2828 committed May 23, 2023
1 parent 0978bdf commit eb08f1b
Show file tree
Hide file tree
Showing 6 changed files with 1,936 additions and 80 deletions.
3 changes: 1 addition & 2 deletions lib/report.js
Expand Up @@ -258,7 +258,7 @@ class Report {
* @param {Set} fileIndex list of files that have coverage
* @returns {Array} list of empty coverage reports
*/
_includeUncoveredFiles(fileIndex) {
_includeUncoveredFiles (fileIndex) {
const emptyReports = []
const workingDirs = this.src
const { extension } = this.exclude
Expand Down Expand Up @@ -325,7 +325,6 @@ class Report {
return reports
}


/**
* Normalizes a process coverage.
*
Expand Down
4 changes: 0 additions & 4 deletions test/fixtures/disable-fs-promises.js

This file was deleted.

16 changes: 8 additions & 8 deletions test/integration.js
Expand Up @@ -163,8 +163,8 @@ beforeEach(function () {
'--temp-directory=tmp/check-coverage',
'--clean=false',
`--merge-async=${mergeAsync}`,
nodePath,
require.resolve('./fixtures/normal')
nodePath,
require.resolve('./fixtures/normal')
])
})

Expand All @@ -177,7 +177,7 @@ beforeEach(function () {
'--lines=70',
'--branches=55',
'--statements=70',
`--merge-async=${mergeAsync}`,
`--merge-async=${mergeAsync}`
])
status.should.equal(0)
output.toString('utf8').should.matchSnapshot()
Expand All @@ -190,7 +190,7 @@ beforeEach(function () {
'--exclude="test/*.js"',
'--temp-directory=tmp/check-coverage',
'--lines=101',
`--merge-async=${mergeAsync}`,
`--merge-async=${mergeAsync}`
])
status.should.equal(1)
output.toString('utf8').should.matchSnapshot()
Expand All @@ -204,7 +204,7 @@ beforeEach(function () {
'--temp-directory=tmp/check-coverage',
'--lines=101',
'--per-file',
`--merge-async=${mergeAsync}`,
`--merge-async=${mergeAsync}`
])
status.should.equal(1)
output.toString('utf8').should.matchSnapshot()
Expand Down Expand Up @@ -248,7 +248,7 @@ beforeEach(function () {
'--exclude="test/*.js"',
'--temp-directory=tmp/check-coverage',
'--100',
`--merge-async=${mergeAsync}`,
`--merge-async=${mergeAsync}`
])
status.should.equal(1)
output.toString('utf8').should.matchSnapshot()
Expand All @@ -275,7 +275,7 @@ beforeEach(function () {
'--exclude="test/*.js"',
'--temp-directory=./tmp/report',
'--clean=false',
`--merge-async=${mergeAsync}`,
`--merge-async=${mergeAsync}`
])
output.toString('utf8').should.matchSnapshot()
})
Expand All @@ -289,7 +289,7 @@ beforeEach(function () {
'--exclude="test/*.js"',
'--temp-directory=tmp/report',
'--clean=false',
`--merge-async=${mergeAsync}`,
`--merge-async=${mergeAsync}`
])
status.should.equal(1)
output.toString('utf8').should.matchSnapshot()
Expand Down

0 comments on commit eb08f1b

Please sign in to comment.