jest-runner-tsc

🃏A Jest runner for the TypeScript compiler

MIT License

Downloads
25.7K
Stars
178
Committers
7

jest-runner-tsc

A Jest runner for the TypeScript compiler

install

npm install --save-dev jest-runner-tsc

usage

Jest configuration:

jest.tsc.config.js:

module.exports = {
  runner: 'jest-runner-tsc',
  displayName: 'tsc',
  moduleFileExtensions: ['js','ts', 'tsx'],
  testMatch: ['<rootDir>/**/*.ts'],
};

options

This project uses cosmiconfig, so you can provide config via:

  • a jest-runner-tsc property in your package.json
  • a jest-runner-tsc.config.js JS file
  • a .jest-runner-tscrc JSON file

Example in package.json

{
  "jest-runner-tsc": {
    "tsconfigPath": "./tsconfig.types.json"
  }
}

tsconfigPath

Default: ./tsconfig.json

A relative path to your tsconfig.json file.

run

jest -c jest.tsc.config.js
Package Rankings
Top 2.68% on Npmjs.org
Badges
Extracted from project README
Travis Prettier npm semantic-release License
Related Projects