forked from adazzle/react-data-grid
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.js
36 lines (34 loc) · 933 Bytes
/
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
'use strict';
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
preset: 'ts-jest/presets/js-with-ts',
globals: {
'ts-jest': {
tsConfig: {
esModuleInterop: true
}
}
},
collectCoverage: process.env.CI === 'true',
collectCoverageFrom: [
'packages/*/src/**/*.{js,jsx,ts,tsx}'
],
coverageReporters: [
'cobertura'
],
restoreMocks: true,
moduleNameMapper: {
'^react-data-grid$': '<rootDir>/packages/react-data-grid/src/',
'^react-data-grid-addons$': '<rootDir>/packages/react-data-grid-addons/src/',
'^@material-ui/icons$': '<rootDir>/test/iconsMock.ts',
'\\.css$': '<rootDir>/test/fileMock.js'
},
setupFiles: [
'<rootDir>/test/setupTests.js'
],
testMatch: [
'<rootDir>/packages/*/src/**/*.spec.(js|ts|tsx)',
'<rootDir>/tests/**/*.test.(ts|tsx)'
]
};