FAIL test/index.spec.js
● Test suite failed to run
TypeError: Cannot read property 'module' of undefined
at compileTypescript (../../node_modules/vue-jest/lib/compilers/typescript-compiler.js:19:32)
at processScript (../../node_modules/vue-jest/lib/process.js:23:12)
at Object.module.exports [as process] (../../node_modules/vue-jest/lib/process.js:42:18)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 2.085 s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @myorg/my-component@0.0.1 test:unit: `NODE_ENV=test jest --config ../../jest.config.js`
Changing my tsconfig to the following fixes the issue:
I saw this issue which is relevant, but not the exact same: https://github.com/vuejs/vue-jest/issues/118
My tsconfig:
Build output:
Changing my tsconfig to the following fixes the issue: