Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Application Jest configuration
"jest": {
"collectCoverage": true,
"collectCoverageFrom": [
"<rootDir>/src/**/*.ts",
"!<rootDir>/src/*.d.ts"
],
"coveragePathIgnorePatterns": [
"/node_modules/",
"/src-test/",
"/dist/"
],
"globals": {
"ts-jest": {
"tsConfigFile": "test-tsconfig.json",
"enableTsDiagnostics": false
},
"NODE_ENV": "test"
},
"moduleDirectories": [
"node_modules",
"<rootDir>/src/"
],
"moduleFileExtensions": [
"ts",
"js",
"html"
],
"moduleNameMapper": {
"customNamespace/(.*)$": "<rootDir>/node_modules/jskitx/$1",
"^.+\\.(jpg|jpeg|gif|png|mp4|mkv|avi|webm|swf|wav|mid)$": "jest-static-stubs/$1"
},
"setupTestFrameworkScriptFile": "<rootDir>/src-test/utils/init.ts",
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(ts?)$",
"testPathIgnorePatterns": [
"/node_modules/"
],
"transform": {
"^.+\\.js?$": "babel-jest",
"^.+\\.ts?$": "ts-jest",
"^.+\\.html$": "<rootDir>/src-test/utils/htmlLoader.ts"
},
"transformIgnorePatterns": [
"/node_modules/(?!jskitx)"
],
"verbose": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.