forked from WPMedia/arc-themes-blocks
-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
41 lines (41 loc) · 1.1 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
module.exports = {
transformIgnorePatterns: [
'//node_modules/(?!@wpmedia/.*-block).*/',
'//node_modules/(?!(@wpmedia)).*/',
],
projects: [
'<rootDir>/blocks/*/jest.config.js',
// '<rootDir>/components/*/jest.config.js',
// Uncomment the components tests once we actually have them.
// Jest doesn't have an option to ignore those errors.
],
coverageDirectory: '<rootDir>/coverage',
coverageThreshold: {
global: {
statements: 85,
branches: 85,
functions: 85,
lines: 85,
},
// if an output type breaks, the page doesn't load
// this should be higher, really
'blocks/default-output-block/output-types': {
statements: 86,
branches: 80,
functions: 100,
lines: 85,
},
},
collectCoverageFrom: [
'**/(features|chains|layouts|sources|output-types|_children)/**/*.{js,jsx}',
// for resizer image block
'**/extractImageFromStory.js',
'**/imageRatioCustomField.js',
'**/ratioFor.js',
'!**/node_modules/**',
'!**/vendor/**',
'!**/images/*.svg',
'!**/mock*.js',
'!**/*.story*.jsx',
],
};