We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
isolate: false
I've found that when using isolate: false, code coverage is returned as blank:
----------|---------|----------|---------|---------|------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|------------------- All files | 0 | 0 | 0 | 0 | ----------|---------|----------|---------|---------|-------------------
Wasn't able to create a repro on StackBlitz because it crashes (sample) with:
TypeError: Cannot read properties of undefined (reading 'setCoverageDirectory') at setupCoverageHooks (https://vitest-dev-vitest-8topul.w.staticblitz.com/blitz.e1937cc6e2ee7e7a1da198d43493f4063378a564.js:6:234055)
Instead, you can repro by cloning this repo and running npm run test.
npm run test
Note that it prints:
But if you go to vitest.config.js and comment out isolate: false it prints:
vitest.config.js
----------|---------|----------|---------|---------|------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|------------------- All files | 100 | 100 | 100 | 100 | basic.ts | 100 | 100 | 100 | 100 | ----------|---------|----------|---------|---------|-------------------
System: OS: macOS 12.2.1 CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz Memory: 29.48 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm Watchman: 2022.02.14.00 - /usr/local/bin/watchman Browsers: Chrome: 98.0.4758.102 Chrome Canary: 100.0.4892.0 Firefox: 96.0.2 Safari: 15.3 npmPackages: vite: latest => 2.8.3 vitest: latest => 0.3.6
npm
The text was updated successfully, but these errors were encountered:
/cc @Demivan
Sorry, something went wrong.
fix: flush coverage after every test file (fix #771) (#776)
7611178
feat(throttleFilter): add leading option (vitest-dev#771)
c0078fb
Demivan
Successfully merging a pull request may close this issue.
Describe the bug
I've found that when using
isolate: false
, code coverage is returned as blank:Reproduction
Wasn't able to create a repro on StackBlitz because it crashes (sample) with:
Instead, you can repro by cloning this repo and running
npm run test
.Note that it prints:
But if you go to
vitest.config.js
and comment outisolate: false
it prints:System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: