You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running vitest with reporter=json option, it produces a JSON output with a wrong error location. It seems that it doesn't take into account of source map corresponding position.
It negatively affects with tools that use that position to show the user which assertion is causing the test to fail. (Eg. the neotest adapter I'm working on https://github.com/marilari88/neotest-vitest)
Describe the bug
Running vitest with
reporter=json
option, it produces a JSON output with a wrong error location. It seems that it doesn't take into account of source map corresponding position.It negatively affects with tools that use that position to show the user which assertion is causing the test to fail. (Eg. the neotest adapter I'm working on https://github.com/marilari88/neotest-vitest)
Reproduction
https://stackblitz.com/edit/node-zkm2qe?file=test/basic.test.ts
Running
npm test --reporter=json
it will produce the piece of JSON below reporting for the first test the wrong line and columnThe location should have line = 10
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: