forked from system-ui/theme-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
54 lines (52 loc) · 1.33 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
48
49
50
51
52
53
54
// @ts-check
/** @typedef {import('ts-jest/dist/types')} */
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
preset: 'ts-jest/presets/js-with-babel',
globals: {
'ts-jest': {
tsconfig: './tsconfig.test.json',
},
},
testMatch: ['**/packages/**/test/*.{js,ts,tsx}'],
testPathIgnorePatterns: [
'/node_modules/',
'/fixtures/',
'/presets/',
'/style-guide/',
'tailwind.config.js',
'/dist/',
'/__test-utils__/',
],
coverageReporters: ['lcov', 'text', 'html'],
collectCoverageFrom: [
'packages/**/src/**/*.{js,ts,tsx}',
'!packages/docs/**/*',
'!packages/presets/**/*',
'!packages/style-guide/**/*',
'!packages/gatsby-theme-style-guide/**/*',
'!packages/chrome/**/*',
'!packages/gatsby-theme-*/**/*',
'!packages/preset-*/**/*',
'!packages/test-utils/**/*',
],
coverageThreshold: {
global: {
branches: 90,
functions: 90,
lines: 90,
statements: 90,
},
},
modulePathIgnorePatterns: ['packages/.*/dist'],
// projects: ['<rootDir>/packages/*'],
snapshotSerializers: ['@emotion/jest/serializer'],
setupFiles: ['jest-canvas-mock'],
transform: {
'^.+\\.jsx?$': '<rootDir>/jest-preprocess.js',
},
moduleNameMapper: {
'@theme-ui/css/dist/types': '@theme-ui/css/src/types',
},
}
module.exports = config