refactor(coverage): remove unnecessary __vite_ssr_exports__ manipulation#7132
refactor(coverage): remove unnecessary __vite_ssr_exports__ manipulation#7132hi-ogawa wants to merge 2 commits intovitest-dev:mainfrom
__vite_ssr_exports__ manipulation#7132Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
AriPerkkio
left a comment
There was a problem hiding this comment.
We should add test case that validates function counts. We used to have one but looks like it got removed during some test setup refactorings.
So maybe something like:
vitest/test/coverage-test/coverage-report-tests/generic.report.test.ts
Lines 132 to 141 in 7fd341c
vitest/test/coverage-test/src/function-count.ts
Lines 1 to 36 in 7fd341c
It looks like there are several tests related to function count like this snapshot vitest/test/coverage-test/test/__snapshots__/results-v8.snapshot.json Lines 108 to 110 in f9a6284 In #7096, I'm seeing |
|
It's probably easier to do it together with #7192, so moving the change to there. |
Description
Vite SSR doesn't create a mapping for
Object.defineProperty(__vite_ssr_exports__, ...)(as they are simply injected byMagicString.appendLeft), so I'm not sure what this replacement on v8 coverage is for.It looks like
test/coverage-testis passing locally. Let me check others on CI.Sadly, this doesn't seem to entirely help #7130. There's still some odd changes (namely export getter
getappears in function coverage) in #7096 after applying the same patch.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:.