-
Notifications
You must be signed in to change notification settings - Fork 19
/
jest.config.mjs
46 lines (41 loc) · 1.07 KB
/
jest.config.mjs
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
// eslint-disable-next-line import/extensions
import jestPuppeteerConfig from './jest-puppeteer.config.js';
const { headless } = jestPuppeteerConfig.launch;
export default {
maxWorkers: headless
? '50%'
: 1,
projects: [
{
displayName: 'unit tests',
setupFilesAfterEnv: ['<rootDir>/lib/jest-helpers.js'],
clearMocks: true,
testMatch: [
'**/*test.js',
'!**/*jsdom.test.js',
'!**/*browser.test.js',
],
},
{
displayName: 'jsdom tests',
testEnvironment: 'jsdom',
snapshotSerializers: ['jest-serializer-html'],
setupFilesAfterEnv: ['<rootDir>/lib/jest-helpers.js'],
clearMocks: true,
testMatch: [
'**/*jsdom.test.js',
],
},
{
displayName: 'browser tests',
preset: 'jest-puppeteer',
clearMocks: true,
setupFilesAfterEnv: ['expect-puppeteer', '<rootDir>/lib/browser-tests/jest-setup.js'],
testMatch: [
'**/*browser.test.js',
],
},
],
modulePathIgnorePatterns: ['<rootDir>/package'],
testTimeout: 60000,
};