Skip to content

Commit

Permalink
test: failing test case for vitest-dev#3330
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed May 9, 2023
1 parent 9836ccb commit 0c4eb85
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Expand Up @@ -94,3 +94,10 @@ test('function count is correct', async () => {
expect(functions.total).toBe(5)
expect(functions.covered).toBe(3)
})

test('coverage provider does not conflict with built-in reporter\'s outputFile', async () => {
const coveragePath = resolve('./coverage')
const files = fs.readdirSync(coveragePath)

expect(files).toContain('junit.xml')
})
4 changes: 4 additions & 0 deletions test/coverage-test/testing.mjs
Expand Up @@ -17,6 +17,10 @@ const configs = [
].filter(Boolean),
coverage: { enabled: true },
browser: { enabled: isBrowser, name: 'chrome', headless: true },

// Regression vitest#3330
reporters: ['default', 'junit'],
outputFile: { junit: 'coverage/junit.xml' },
}],

// Run tests for checking coverage report contents.
Expand Down

0 comments on commit 0c4eb85

Please sign in to comment.