A Jest Runner for the TypeScript compiler
npm install jest-runner-tscjest-runner-tsc




> A Jest runner for the TypeScript compiler
``bash`
npm install --save-dev jest-runner-tsc
Jest configuration:
jest.tsc.config.js:
`js`
module.exports = {
runner: 'jest-runner-tsc',
displayName: 'tsc',
moduleFileExtensions: ['js','ts', 'tsx'],
testMatch: ['
};
This project uses cosmiconfig, so you can provide config via:
- a jest-runner-tsc property in your package.jsonjest-runner-tsc.config.js
- a JS file.jest-runner-tscrc
- a JSON file
`json`
{
"jest-runner-tsc": {
"tsconfigPath": "./tsconfig.types.json"
}
}
Default: ./tsconfig.json
A relative path to your tsconfig.json file.
```
jest -c jest.tsc.config.js