项目作者: azz

项目描述 :
🃏A Jest runner for the TypeScript compiler
高级语言: JavaScript
项目地址: git://github.com/azz/jest-runner-tsc.git
创建时间: 2017-12-19T13:07:32Z
项目社区:https://github.com/azz/jest-runner-tsc

开源协议:MIT License

下载


jest-runner-tsc

Travis
Prettier
npm
semantic-release
License

A Jest runner for the TypeScript compiler

install

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

usage

Jest configuration:

jest.tsc.config.js:

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

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

  1. {
  2. "jest-runner-tsc": {
  3. "tsconfigPath": "./tsconfig.types.json"
  4. }
  5. }

tsconfigPath

Default: ./tsconfig.json

A relative path to your tsconfig.json file.

run

  1. jest -c jest.tsc.config.js