Skip to content

πŸƒA Jest runner for the TypeScript compiler

License

Notifications You must be signed in to change notification settings

azz/jest-runner-tsc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f5100dd Β· Oct 16, 2019

History

15 Commits
Oct 16, 2019
Feb 2, 2019
Feb 2, 2019
Sep 17, 2018
Feb 2, 2019
Dec 19, 2017
Feb 2, 2019
Dec 19, 2017
Oct 16, 2019
Feb 2, 2019
Oct 16, 2019
Oct 16, 2019

Repository files navigation

jest-runner-tsc

Travis Prettier npm semantic-release License

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