Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test coverage report not working. #187

Open
xereda opened this issue Jul 11, 2019 · 4 comments
Open

Test coverage report not working. #187

xereda opened this issue Jul 11, 2019 · 4 comments
Labels
bug

Comments

@xereda
Copy link

@xereda xereda commented Jul 11, 2019

The test coverage report is not working. Terminal details and html report, both are not being generated.

I created a project with vue cli 3.0 to do the tests. Available in github: https://github.com/xereda/vue-3.0

Commands executed:

npm run test:unit -- --coverage  
// vue-cli-service test:unit "--coverage"

DeepinScreenshot_select-area_20190711140344

npm run test:unit -- --coverage --watch
//  vue-cli-service test:unit "--coverage" "--watch"

DeepinScreenshot_select-area_20190711140449

Report not generated:

DeepinScreenshot_select-area_20190711140636

@eddyerburgh eddyerburgh added the bug label Sep 8, 2019
@johnwebbcole

Loading…

@johnwebbcole johnwebbcole commented Nov 10, 2019

Any solution to this? I just tried a new project

npx @vue/cli@3 create cli3-test and then in cli3-test running npm run test:unit -- --coverage I'm getting the same results.

Thx

@ThePeach

Loading…

@ThePeach ThePeach commented Feb 20, 2020

I'd like to chime in here, I'm facing essentially the same problem, currently with vue-jest 3.0.5 I can't get any coverage report for vue files. all I get are for js files.
On a separate project I have no problems with coverage, but it's using 4.0.0 beta 2.
On this current project I'm unable to upgrade as I'm getting errors in compilation of the templates (I'm using @nuxt/style-resources module to include some scss variable in my templates and for some reason this is not picked up and fails abruptly).
Any suggestion/tip, is greatly appreciated!

@ThePeach

Loading…

@ThePeach ThePeach commented Feb 26, 2020

Just an update if anyone's following this issue: as explained in another issue (#217) the problem seems to be related to latest version of jest v25. Downgrading seems to be a decent enough workaround to this problem for the meantime

@TolikSyedin

Loading…

@TolikSyedin TolikSyedin commented Feb 28, 2020

Downgrading to 24.9.0 fixes the issue, now I have my vue components shown in the test coverage
table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.