Use transform option to make ts test work
This commit is contained in:
16
package.json
16
package.json
@@ -33,14 +33,24 @@
|
||||
"media": "cds watch media",
|
||||
"mocha": "npx mocha || echo",
|
||||
"jest": "npx jest",
|
||||
"test": "npm run jest --silent --testMatch test/*.test.js && npm run test:ts",
|
||||
"test:ts": "npm run jest --silent --preset ts-jest --testMatch test/*.test.ts"
|
||||
"test": "npm run jest --silent"
|
||||
},
|
||||
"mocha": {
|
||||
"parallel": true
|
||||
},
|
||||
"jest": {
|
||||
"testEnvironment": "node"
|
||||
"testEnvironment": "node",
|
||||
"transform": {
|
||||
"\\.ts$": "ts-jest"
|
||||
},
|
||||
"globals": {
|
||||
"ts-jest": {
|
||||
"diagnostics": {
|
||||
"_comment": "see https://githubmemory.com/repo/kulshekhar/ts-jest/issues/2722",
|
||||
"ignoreCodes": [151001]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"license": "SAP SAMPLE CODE LICENSE",
|
||||
"private": true
|
||||
|
||||
Reference in New Issue
Block a user