-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
package.json
{
"scripts": {
"test": "jest ./tests",
"test:ts": "jest -c jest.tsc.config.js"
},
"jest-runner-tsc": {
"tsconfigPath": "./tsconfig.json"
}
}jest: 27.4.7
jest-runner-tsc: 1.6.0
jest.tsc.config.js
module.exports = {
runner: 'jest-runner-tsc',
displayName: 'tsc',
moduleFileExtensions: ['js', 'jsx','ts', 'tsx'],
testMatch: ['<rootDir>/tests/*.tsx'],
};tsconfig.json
{
"compileOnSave": false,
"module": "ESNext",
"target": "ESNext",
"compilerOptions": {
"strict": true,
"noEmit": true,
"declaration": true,
"moduleResolution": "node",
"esModuleInterop": true
},
"include": ["package/*.ts", "test/*.tsx"]
}Running yarn test is working fine!!!
However running yarn test:ts an error is fired: Cannot use JSX unless the '--jsx' flag is provided.. When do I need to add this --jsx flag?
Thanks
Metadata
Metadata
Assignees
Labels
No labels
