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.
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.
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.
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:.