{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"noImplicitAny": false,
"types": [
"webpack-env",
"jest"
],
"paths": {
"@/*": [
"src/*"
],
},
"lib": [
"esnext",
"dom",
"es5",
"es6",
"es2015.promise",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
}
"jest": {
"globals": {
"vue-jest": {
"tsConfig": "./tsconfig.json"
}
},
"moduleFileExtensions": [
"js",
"ts",
"json",
"vue"
],
"transform": {
".*\\.(vue)$": "vue-jest",
"^.+\\.tsx?$": "ts-jest"
},
"testURL": "test.url.com",
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$"
}
run npm run test then got error messsage
SyntaxError: .../.../tsconfig.json: Unexpected token } in JSON at position 468
at JSON.parse (<anonymous>)
at loadTypescriptConfig (node_modules/vue-jest/lib/load-typescript-config.js:55:30)
at compileTypescript (node_modules/vue-jest/lib/compilers/typescript-compiler.js:9:20)
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)
Hey @AlllenShen , your tslint.config.json is invalid. There's a trailing comma at the closing bracket of your first path which results in invalid JSON.
To quickly debug this I usually use https://jsonlint.com/
Happy coding!
@vanhoofmaarten Thank you so much馃榿
@AlllenShen My pleasure. Don't forget to close this issue if it solves your problem.
Most helpful comment
Hey @AlllenShen , your tslint.config.json is invalid. There's a trailing comma at the closing bracket of your first path which results in invalid JSON.
To quickly debug this I usually use https://jsonlint.com/
Happy coding!