-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
hoisted
does not work with istanbul coverage when overriding coverage excludes
#6057
Comments
Found the workaround, you need to include
|
It is expected that coverage picks up a test file if you override It is unexpected that it throws an error in |
@sheremet-va How about excluding .vue files imported in .js test files from coverage report? how can we do that? |
In my case I ran into this issue of hoisted causing SyntaxError when running with istanbul coverage after updating my dependencies. What worked for me was adding test files to my existing
|
Describe the bug
If you use istanbul coverage (required for browser mode), override the coverage
excludes
, and usevi.hoisted
, then your test runs fail with cryptic syntax errors.This worked on
v2.0.0-beta.12
and is broken onv2.0.1
.Reproduction
https://github.com/kwojcik/vitestsourcemapbug/tree/hoistedBug
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: