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
65 lines (64 loc) · 2.17 KB
/
Copy pathjest.config.js
File metadata and controls
65 lines (64 loc) · 2.17 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
const { jsWithBabel: tsjPreset } = require('ts-jest/presets')
module.exports = {
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!src/**/?(*.)types.{js,jsx,ts,tsx}',
'!src/**/?(*.)helpers.{js,jsx,ts,tsx}',
'!src/**/?(*.)testHelpers.{js,jsx,ts,tsx}',
'!src/tests/helpers/**/*.{js,jsx,ts,tsx}',
'!src/styles/tests/helpers/**/*.{js,jsx,ts,tsx}',
'!src/**/?(*.)css.{js,jsx,ts,tsx}',
'!src/index.{js,jsx,ts,tsx}',
'!src/components/Input/utils.{js,jsx}',
'!src/components/Dropdown/V2/Dropdown.Renderer.tsx',
'!src/components/Dropdown/V2/Dropdown.renderUtils.ts',
'!src/components/Popper/**/*.{js,jsx}',
'!src/tests/helpers/**/*.{js,jsx}',
'!src/utilities/browser.{js,jsx,ts}',
'!src/utilities/env.{js,jsx,ts}',
'!src/utilities/react-router/**/*.{js,jsx}',
'!src/utilities/smoothScroll.{js,jsx}',
'!src/utilities/closest.ts',
'!src/utilities/memoizeOne.{js,ts}',
'!src/utilities/index.{js,jsx}',
'!src/utilities/log.{js,jsx}',
'!src/styles/includePaths.js',
'!src/polyfills/**/*.{js,jsx}',
'!src/vendors/**/*.{js,jsx}',
'!src/components/index.js',
'!src/components/Animate/animations/**/*',
],
coverageDirectory: 'coverage/',
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
setupFiles: [
'<rootDir>/config/polyfills.js',
'<rootDir>/config/jsdomPolyfills.js',
],
setupFilesAfterEnv: ['<rootDir>/config/jest/setupTests.js'],
testMatch: [
'<rootDir>/src/**/__tests__/**/*.test.(js|jsx|ts|tsx)',
'<rootDir>/src/**/?(*.)(spec|test).js?(x)',
'<rootDir>/src/**/?(*.)(spec|test).ts?(x)',
],
testEnvironment: 'node',
testURL: 'http://localhost',
transform: {
...tsjPreset.transform,
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)':
'<rootDir>/config/jest/fileTransform.js',
},
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$'],
moduleFileExtensions: ['web.js', 'js', 'json', 'web.jsx', 'jsx', 'ts', 'tsx'],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
}