Skip to content

Instantly share code, notes, and snippets.

@rnag
Created January 7, 2022 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rnag/5bf66f1134b91864295c47d6f166c105 to your computer and use it in GitHub Desktop.
Save rnag/5bf66f1134b91864295c47d6f166c105 to your computer and use it in GitHub Desktop.
jest config
module.exports = {
testEnvironment: 'node',
roots: ['<rootDir>/test'],
testMatch: ['**/*.test.ts'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
// Added so that jest prefer to run tests on files
// with the *.ts extension instead (see below).
// https://stackoverflow.com/a/50145833/10237506
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment