This repository was archived by the owner on Aug 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathjest.config.js
More file actions
44 lines (44 loc) · 1.34 KB
/
jest.config.js
File metadata and controls
44 lines (44 loc) · 1.34 KB
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
module.exports = {
collectCoverageFrom: [
'src/**/*.{js,jsx}',
'!src/**/index.{js,jsx}',
'!src/**/?(*.)css.{js,jsx}',
'!src/**/?(*.)helpers.{js,jsx}',
'!src/**/?(*.)labs.{js,jsx}',
'!src/**/?(*.)stories.{js,jsx}',
'!src/**/stories/*.{js,jsx}',
'!src/**/stories/**/*.{js,jsx}',
'!src/**/?(*.)hsappstories.{js,jsx}',
'!src/**/?(*.)storiesHelpers.{js,jsx}',
'!src/utilities/specs/**/*.{js,jsx}',
'!src/vendors/**/*.{js,jsx}',
],
coverageDirectory: 'coverage/',
coverageThreshold: {
global: {
branches: 85,
functions: 85,
lines: 85,
statements: 85,
},
},
setupFiles: ['<rootDir>/config/jsdomPolyfills.js'],
setupFilesAfterEnv: ['<rootDir>/config/jest/setupTests.js'],
testMatch: [
'<rootDir>/src/**/__tests__/**/*.test.(js|jsx)',
'<rootDir>/src/**/?(*.)(spec|test).js?(x)',
],
testEnvironment: 'jsdom',
testURL: 'http://localhost',
transform: {
'^.+\\.[t|j]sx?$': 'babel-jest',
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
'^(?!.*\\.(js|jsx|css|json)$)': '<rootDir>/config/jest/fileTransform.js',
},
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'],
moduleFileExtensions: ['web.js', 'js', 'json', 'web.jsx', 'jsx'],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
}