Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Library 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
}
},
"moduleDirectories": [
"node_modules",
"<rootDir>/src/"
],
"moduleFileExtensions": [
"ts",
"js",
"html"
],
"moduleNameMapper": {
"ot/(.*)$": "<rootDir>/src/$1",
"^.+\\.(jpg|jpeg|gif|png|mp4|mkv|avi|webm|swf|wav|mid)$": "jest-static-stubs/$1"
},
"setupTestFrameworkScriptFile": "<rootDir>/src-test/utils/init.ts",
"transform": {
"^.+\\.(j|t)s?$": "ts-jest",
"^.+\\.html$": "<rootDir>/src-test/utils/htmlLoader.ts"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(ts?)$",
"testPathIgnorePatterns": [
"/node_modules/"
],
"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.