Skip to content

Commit

Permalink
fix(unit-jest): fix .vue coverage report when babel plugin is not ena…
Browse files Browse the repository at this point in the history
…bled (#5499)
  • Loading branch information
sodatea committed May 19, 2020
1 parent aee9e17 commit 0295ff6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -66,6 +66,10 @@ test('should work without Babel', async () => {
useConfigFiles: true
})
await project.run(`vue-cli-service test:unit`)

await project.run(`vue-cli-service test:unit --coverage --collectCoverageFrom="src/**/*.{js,vue}"`)
const appCoverage = await project.read('coverage/lcov-report/App.vue.html')
expect(appCoverage).toBeTruthy()
})

test('should work with tsx', async () => {
Expand Down
Expand Up @@ -13,7 +13,7 @@ module.exports = deepmerge(
globals: {
'vue-jest': {
babelConfig: {
plugins: [require('babel-plugin-transform-es2015-modules-commonjs')]
plugins: ['babel-plugin-transform-es2015-modules-commonjs']
}
}
}
Expand Down

0 comments on commit 0295ff6

Please sign in to comment.