-
Notifications
You must be signed in to change notification settings - Fork 7
/
jest.config.js
30 lines (30 loc) · 1.08 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
module.exports = {
projects: [
{
displayName: 'Unit and Integration Tests',
testEnvironment: 'jsdom',
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/src/__tests__/fileMock.js',
'\\.(scss)$': 'identity-obj-proxy',
'view/(.*)': '<rootDir>/src/js/view/$1',
api: '<rootDir>/src/js/api',
'model/(.*)': '<rootDir>/src/js/model/$1',
'tests/(.*)': '<rootDir>/src/__tests__/$1',
},
testMatch: ['**/__tests__/**/*.test.js'],
testPathIgnorePatterns: ['/node_modules/', 'src/__tests__/e2e'],
setupFilesAfterEnv: ['<rootDir>/src/__tests__/setup.js'],
},
{
displayName: 'E2E Tests',
preset: 'jest-puppeteer',
testMatch: ['**/__tests__/e2e/tests/**/*.test.js'],
globalSetup: '<rootDir>/src/__tests__/e2e/global-setup.js',
setupFilesAfterEnv: ['expect-puppeteer', '<rootDir>/src/__tests__/e2e/setup.js'],
moduleNameMapper: {
'view/(.*)': '<rootDir>/src/js/view/$1',
},
},
],
};