-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
41 lines (40 loc) · 1.23 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
const path = require('path');
module.exports = {
collectCoverageFrom: ['src/**/*.{js,jsx}'],
testMatch: [
'<rootDir>/__test__/**/__tests__/**/*.{js,jsx}',
'<rootDir>/__test__/**/?(*.)(spec|test).{js,jsx}',
],
testEnvironment: 'node',
transform: {
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.s?css$': '<rootDir>/config/jest/cssTransform.js',
'^(?!.*\\.(js|jsx|css|scss|json)$)':
'<rootDir>/config/jest/fileTransform.js',
},
moduleNameMapper: {
'.*\\.(less|css)$': path.join(__dirname, 'config', 'jest', 'transform.js'),
'.*\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': path.join(__dirname, 'config/jest', 'transform.js'),
},
testPathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/config/',
'<rootDir>/src/assets/',
'<rootDir>/examples/',
'<rootDir>/lib/',
],
transformIgnorePatterns: [
'node_modules',
'/node_modules/(?!@ckeditor/ckeditor5-editor-classic).+\\.js$',
],
moduleFileExtensions: ['js', 'json', 'jsx'],
setupFilesAfterEnv: ['<rootDir>/config/jest/adapter.js'],
coverageThreshold: {
// "global": {
// "branches": 90,
// "functions": 95,
// "lines": 95,
// "statements": 95
// }
},
};