We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Throwing a literal value such as a number or string causes an error inside Vitest:
test('throwing', () => { throw 1337; });
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ TypeError: Cannot create property 'stacks' on number '1337' ❯ Module.parseErrorStacktrace file:/home/projects/vitest-dev-vitest-araj6a/node_modules/vitest/dist/chunk-utils-tasks.b41c8284.js:98:12 ❯ eval file:/home/projects/vitest-dev-vitest-araj6a/node_modules/vitest/dist/chunk-api-setup.ac7748ac.js:4616:62 ❯ WebSocketReporter.onTaskUpdate file:/home/projects/vitest-dev-vitest-araj6a/node_modules/vitest/dist/chunk-api-setup.ac7748ac.js:4613:11 ❯ eval file:/home/projects/vitest-dev-vitest-araj6a/node_modules/vitest/dist/chunk-node-pkg.f9696901.js:15594:51 ❯ Vitest.report file:/home/projects/vitest-dev-vitest-araj6a/node_modules/vitest/dist/chunk-node-pkg.f9696901.js:15592:38 ❯ Proxy.onTaskUpdate file:/home/projects/vitest-dev-vitest-araj6a/node_modules/vitest/dist/chunk-node-pkg.f9696901.js:10394:11 ❯ _0x238689.eval file:/home/projects/vitest-dev-vitest-araj6a/node_modules/vitest/dist/vendor-index.783e7f3e.js:57:42 ❯ [nodejs.internal.kHybridDispatch] https:/vitestdevvitestaraj6a-urad.w-credentialless.staticblitz.com/blitz.88d3a49b591611919d7d64c44b90ff5f8e939906.js:6:413600
Seems like a regression of #1916, which was resolved by #1921.
https://stackblitz.com/edit/vitest-dev-vitest-araj6a?file=test/basic.test.ts
See Stackblitz.
npm
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
Throwing a literal value such as a number or string causes an error inside Vitest:
Seems like a regression of #1916, which was resolved by #1921.
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-araj6a?file=test/basic.test.ts
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: