Created
January 7, 2022 15:51
-
-
Save rnag/5bf66f1134b91864295c47d6f166c105 to your computer and use it in GitHub Desktop.
jest config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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