vue-jest: V4.0.0-beta.1
I am not using Typescript anywhere in my app. If I dont have typescript as a dev dependency my tests fail with this error:
Unable to load the module "typescript". Using "ts-jest" requires this package to be installed. To fix it:
↳ install "typescript": `npm i -D typescript` (or `yarn add --dev typescript`)
If I install typescript as a dev dependency, all my tests pass, but all my tests that test regular .js files (not .vue files) give this warning:
ts-jest[versions] (WARN) Version 24.0.0 of jest installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=22.0.0 <24.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
Jest config:
"jest": {
"moduleFileExtensions": [
"js",
"json",
"vue"
],
"setupFiles": [
"<rootDir>/resources/assets/js/__tests__/utils/mockument"
],
"testPathIgnorePatterns": [
"<rootDir>/resources/assets/js/__tests__/utils/"
],
"transform": {
"^.+\\.js$": "babel-jest",
"^.+\\.vue$": "vue-jest"
},
"moduleNameMapper": {
"^@/(.*)$": "<rootDir>/resources/assets/js/$1"
}
}
Thanks for the bug report, this is a known issue that will be fixed in the next release.
Fixed in beta.2
Thanks @eddyerburgh, it's working great now 🙏
I am running 5.0.0-alpha.4 and seeing this same issue (I'm on Vue 3). Could this be a regression?
Most helpful comment
Thanks for the bug report, this is a known issue that will be fixed in the next release.