forked from DynamoDS/NotificationCenter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
42 lines (41 loc) · 1.07 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
36
37
38
39
40
41
42
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
module.exports = {
projects: [
{
displayName: 'Lint',
runner: 'jest-runner-eslint',
testMatch: ['<rootDir>/src/**/*.js', '<rootDir>/tests/**/*.test.js'],
},
{
displayName: 'Unit Tests',
testMatch: ['<rootDir>/tests/unit/*.test.js'],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif)$': '<rootDir>/tests/unit/__mocks__/fileMock.js',
'\\.(css|less)$': '<rootDir>/tests/unit/__mocks__/styleMock.js',
},
},
{
displayName: 'E2E Tests',
testMatch: ['<rootDir>/tests/e2e/*.test.js'],
preset: 'jest-puppeteer',
},
],
reporters: [
'default',
[
'jest-junit',
{
outputDirectory: 'reports',
outputName: 'report.xml',
classNameTemplate: '{classname}',
titleTemplate: '{title}',
},
],
],
collectCoverage: true,
collectCoverageFrom: ['<rootDir>/src/**/*.{js,jsx}'],
coverageDirectory: '<rootDir>/reports/coverage',
};