forked from bible-technology/scribe-scripture-editor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
47 lines (47 loc) · 1.28 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
43
44
45
46
47
module.exports = {
collectCoverageFrom: [
'**/*.{js,jsx}',
'!**/node_modules/**',
'!**/tests/**',
'!**/coverage/**',
'!jest.config.js',
'!**/testconfig/**',
],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
moduleDirectories: [
'node_modules',
'renderer',
],
moduleNameMapper: {
'\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
'@core/(.*)$': '<rootDir>/renderer/src/core/$1',
'@components/(.*)$': '<rootDir>/renderer/src/components/$1',
'@modules/(.*)$': '<rootDir>/renderer/src/modules/$1',
'@layouts/(.*)$': '<rootDir>/renderer/src/layouts/$1',
},
setupFilesAfterEnv: [
'<rootDir>/testconfig/setupTests.js',
],
testMatch: [
// '**/?(*.)+(spec|test).[jt]s?(x)' removing ts files from unit test because the integration
// test is been written in ts and 'npm test 'runs e2e test too and it fails now.
'**/?(*.)+(spec|test).[j]s?(x)',
],
testPathIgnorePatterns: [
'/.next/',
'/node_modules/',
'/testconfig/',
'/coverage/',
],
transform: {
'^.+\\.jsx?$': 'babel-jest',
},
};