azz / jest-runner-tsc

🃏A Jest runner for the TypeScript compiler
MIT License
178 stars 12 forks source link

Config in readme is invalid #12

Closed andrew-w-ross closed 5 years ago

andrew-w-ross commented 5 years ago

Using the config in the readme:

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

Fails when running jest with

Validation Error:

  moduleFileExtensions must include 'js':
  but instead received:
    ["ts","tsx"]
  Please change your configuration to include 'js'.

  Configuration Documentation:
  https://jestjs.io/docs/configuration.html

To fix just add js to moduleFileExtensions.

azz commented 5 years ago

Huh, this must be new-ish. Do you want to do a PR to update the docs?