-
Notifications
You must be signed in to change notification settings - Fork 13
/
jest.config.js
37 lines (35 loc) · 1.05 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
const lib = '/lib/';
const react = ['<rootDir>/packages/react', '<rootDir>/packages/styled'];
const runtime = ['<rootDir>/packages/core', '<rootDir>/packages/runtime'];
module.exports = {
testPathIgnorePatterns: [lib],
collectCoverageFrom: [
'packages/**/*.js',
'!**/spec/**',
'!packages/eslint/index.js',
'!packages/reshadow/index.js',
'!packages/svelte/index.js',
'!packages/vue/index.js',
],
transform: {
'^.+\\.jsx?$': 'babel-jest',
},
projects: [
{
displayName: 'client',
roots: [...react, ...runtime],
modulePathIgnorePatterns: [lib],
setupFilesAfterEnv: ['jest-enzyme'],
testEnvironment: 'enzyme',
testEnvironmentOptions: {
enzymeAdapter: 'react16',
},
},
{
displayName: 'node',
roots: ['<rootDir>/packages/'],
modulePathIgnorePatterns: [lib, ...react, ...runtime],
testEnvironment: 'node',
},
],
};