-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
31 lines (30 loc) · 1.06 KB
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
export default {
globals: {
__DEV__: true,
},
// Jest assumes we are testing in node environment, specify jsdom environment instead
testEnvironment: 'jest-environment-node',
// Needed in JS codebases too because of feature flags
coveragePathIgnorePatterns: ['/node_modules/', '.d.ts$'],
testMatch: [
'<rootDir>/tests/unit/**/*.spec.js',
],
moduleFileExtensions: ['js'],
moduleNameMapper: {
'^src/(.*)$': '<rootDir>/src/$1',
'^tests/(.*)$': '<rootDir>/tests/$1',
'^package\\.json$': '<rootDir>/package.json',
},
transform: {
},
transformIgnorePatterns: ['<rootDir>/node_modules/(?!d3|d3-array|internmap|delaunator|robust-predicates)'],
//testResultsProcessor: 'jest-sonar-reporter',
collectCoverage: true,
collectCoverageFrom: ['src/**/*.js'],
coverageReporters: ['lcov', 'cobertura', 'text-summary', 'text'],
coverageDirectory: './reports',
};