-
Notifications
You must be signed in to change notification settings - Fork 159
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
Tests failing with No coverage available for <vue files only>
#48
Comments
@ccamarat I ran into this issue this morning, and couldn't work out for the life of me what the problem was. All of my files were doubling up in the coverage report too, was that happening to you? I ended up back-tracking over what I'd done since yesterday, and I'd moved some tests into a directory inside of |
I apologize for the delay. Yes, items in the /components are showing up twice in the report! I've done a few small experiments:
Whatever this is it looks Windows-specific. |
I was able to throw a couple hours at this one today. I've got a successful (if limited) workaround and was able to determine that the issue was introduced with Jest v22.0.0. I also have some info that may help someone track this down or resolve. Work Around Troubleshooting Activities
I futzed around with the config file for a while. For a bit I was hopeful that the The last piece of information while reviewing the coverage report itself. As @BeauAgst pointed out, the coverage report lists the tested Vue files twice, while the untested Vue files are only listed once. I'm not sure how many core devs use Windows so I'll post a picture: |
I've removed cacheing in 2.1.1, can you see if this solved the issue? |
First, the good news - It stopped crashing -- thanks! Bad news is the "repeated" test is still appearing: d:\tmp\jest-test7
λ npm run unit
> jest-test7@1.0.0 unit d:\tmp\jest-test7
> jest --config test/unit/jest.conf.js --coverage
PASS test\unit\specs\HelloWorld.spec.js
HelloWorld.vue
√ should render correct contents (25ms)
----------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------------|----------|----------|----------|----------|-------------------|
All files | 91.3 | 50 | 83.33 | 80 | |
HelloWorld.vue | 100 | 50 | 100 | 100 | 102,103,104,105 |
HelloWorld.vue | 0 | 100 | 0 | 0 | 89,90 |
----------------|----------|----------|----------|----------|-------------------|
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 3.784s
Ran all test suites.
d:\tmp\jest-test7 I guess that's a separate problem - who'd have thunk it? LMK if I should open a new defect for it. |
If you're still having the second issue, please open a new issue with a reproduction that I can run. |
Thanks. I was away from jest for a bit and lost track of this. I tried it again the other day and did not notice the duplicated report anymore. Thanks again! |
Originally posted at vuejs-templates/webpack; steps to reproduce the issue are in that post.
Tests were working on Saturday; they started failing last night (PST). JavaScript-only Jest tests without Vue components pass with coverage enabled. Vue tests pass if coverage is disabled.
Note: The setup for this is defect to simply use the vue-cli to install the webpack template and run
npm run test
. I'm using Windows 10.The text was updated successfully, but these errors were encountered: