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
When running unit tests for Vue 2 SFC components with jest via vue-test-utils (+babel +typescript) the reported stack trace error line numbers are wrong.
Steps to reproduce
Create a new Vue CLI project: npx @vue/cli create repro-project
Edit HelloWorld.vue component by adding a mounted() {} lifecycle hook containing something like this:
mounted(){this.iAmNotDefined=iAmNotDefineder}
Run npm run test:unit
or pull my repro repo and run npm install && npm run test:unit
Expected behaviour
The correct line number is shown in the stack trace.
Actual behaviour
The opposite of the expected behaviour.
Possible Solution
My hunch says it's a transformation issue, but I've no idea if it's ts-jest, vue-jest, babel-js or the sfc compiler.
The text was updated successfully, but these errors were encountered:
Subject of the issue
When running unit tests for Vue 2 SFC components with
jest
viavue-test-utils
(+babel +typescript) the reported stack trace error line numbers are wrong.Steps to reproduce
npx @vue/cli create repro-project
HelloWorld.vue
component by adding amounted() {}
lifecycle hook containing something like this:npm run test:unit
or pull my repro repo and run
npm install && npm run test:unit
Expected behaviour
The correct line number is shown in the stack trace.
Actual behaviour
The opposite of the expected behaviour.
Possible Solution
My hunch says it's a transformation issue, but I've no idea if it's
ts-jest
,vue-jest
,babel-js
or the sfc compiler.The text was updated successfully, but these errors were encountered: