Skip to content

Instantly share code, notes, and snippets.

@aktraore
Created April 27, 2018 12:25
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 aktraore/346b2ab83297074a539ea9c1bc7bc39b to your computer and use it in GitHub Desktop.
Save aktraore/346b2ab83297074a539ea9c1bc7bc39b to your computer and use it in GitHub Desktop.
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