generated from ditrit/leto-modelizer-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
executable file
·35 lines (34 loc) · 1.02 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
32
33
34
35
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
module.exports = {
globals: {
__DEV__: true,
},
// Jest assumes we are testing in node environment, specify jsdom environment instead
testEnvironment: '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',
},
moduleDirectories: [
'node_modules',
],
transform: {
'^.+\\.(js|jsx)?$': 'babel-jest',
},
transformIgnorePatterns: ['<rootDir>/node_modules/(?!lidy-js)'],
testResultsProcessor: 'jest-sonar-reporter',
collectCoverage: true,
collectCoverageFrom: ['src/**/*.js'],
coverageReporters: ['lcov', 'cobertura', 'text-summary', 'text'],
coverageDirectory: './reports',
};