Commits
With `includeTaskLocation` enabled, the runner reads `error.stack` for
every registered test and suite. Reading `.stack` invokes Vite's
`prepareStackTrace` sourcemap interceptor, which currently throws
`TypeError: Cannot assign to read only property 'constructor'` if the
test file ran `Object.freeze(Object.prototype)`, failing collection of
the whole file (vitest-dev/vscode#798).
Move the `.stack` access into `findTestFileStackTrace` and guard it so
the task just loses its location instead of failing collection.
Co-authored-by: vitest-release-bot[bot] <292707936+vitest-release-bot[bot]@users.noreply.github.com>
Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ari Perkkiö <ari.perkkio@gmail.com>
Co-authored-by: Hiroshi Ogawa <4232207+hi-ogawa@users.noreply.github.com>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: Shaoyu Meng <shaoyumeng@shaoyus-mbp-5.lan>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Hiroshi Ogawa <4232207+hi-ogawa@users.noreply.github.com>
Co-authored-by: OpenCode (claude-opus-4-8) <noreply@opencode.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Ari Perkkiö <ari.perkkio@gmail.com>
Co-authored-by: Hiroshi Ogawa <4232207+hi-ogawa@users.noreply.github.com>
Co-authored-by: OpenCode (claude-opus-4-8) <noreply@opencode.ai>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: vitest-release-bot[bot] <292707936+vitest-release-bot[bot]@users.noreply.github.com>
Co-authored-by: mdong1909 <mdong1909@users.noreply.github.com>
Co-authored-by: Hiroshi Ogawa <4232207+hi-ogawa@users.noreply.github.com>
Co-authored-by: OpenCode (claude-opus-4-8) <noreply@opencode.ai>
With `includeTaskLocation` enabled, the runner reads `error.stack` for
every registered test and suite. Reading `.stack` invokes Vite's
`prepareStackTrace` sourcemap interceptor, which currently throws
`TypeError: Cannot assign to read only property 'constructor'` if the
test file ran `Object.freeze(Object.prototype)`, failing collection of
the whole file (vitest-dev/vscode#798).
Move the `.stack` access into `findTestFileStackTrace` and guard it so
the task just loses its location instead of failing collection.
Co-authored-by: vitest-release-bot[bot] <292707936+vitest-release-bot[bot]@users.noreply.github.com>
Co-authored-by: vitest-release-bot[bot] <292707936+vitest-release-bot[bot]@users.noreply.github.com>