-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix(coverage): browser mode + coverage.all
#7597
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
fix(coverage): browser mode + coverage.all
#7597
Conversation
@vitest/browser
@vitest/coverage-istanbul
@vitest/coverage-v8
@vitest/expect
@vitest/mocker
@vitest/runner
@vitest/pretty-format
@vitest/snapshot
@vitest/spy
@vitest/ui
@vitest/utils
vite-node
vitest
@vitest/web-worker
@vitest/ws-client
commit: |
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
85550bc to
874d14d
Compare
a2a5043 to
272ae0d
Compare
2208f7d to
12d473c
Compare
AriPerkkio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright the Windows issues are finally resolved. @mrginglymus could you do one final check with https://pkg.pr.new/vitest@12d473c and equivalent preview packages with your real-world project?
| // On Windows root doesn't start with "/" while filenames do | ||
| if (!filename.startsWith(root) && !filename.startsWith(`/${root}`)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Windows the root is here D:/a/vitest/vitest/test/coverage-test while filename is /D:/a/vitest/vitest/test/coverage-test/fixtures/src/untested-file.ts.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
@AriPerkkio yes this is working correctly on my real-world project. Thanks so much for the effort in fixing this! |
03cd06b to
e653bec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
How did you eventually fix optimize deps error? Is it by switching vitenode.transformRequest with browser.transformRequest #7597 (comment)?
Switching to But when using browser, this change was enough to fix it. And when doing parallel requests, it was important not to reset + browser.config.optimizeDeps.noDiscovery = true
const result = await browser?.transformRequest(filename).catch(() => null)Setting the |
|
But, if this relies on vite node's server and browser mode's server being different, would it potentially block the plan of merging the server? #6912 |
How does it matter though? The code output is the same, isn't it what matters here? |
|
I thought the difference is vite-node's server explicitly configures |
Yes, but does it matter for coverage what these options are? |
I would imagine I think it's good to land with |
Description
vitenodefor uncovered files #6044 (comment)Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yamlunless you introduce a new test example.Tests
pnpm test:ci.Documentation
pnpm run docscommand.Changesets
feat:,fix:,perf:,docs:, orchore:.