-
Notifications
You must be signed in to change notification settings - Fork 19
/
jest.config.client.js
30 lines (28 loc) · 1.08 KB
/
jest.config.client.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
const sharedConfig = require('./scripts/jest/jest.config.base.js');
const moduleNameMapper = {
'\\.(css)$': 'identity-obj-proxy',
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/__mocks__/file-stub.js',
'@jpmorganchase/mosaic-components': '<rootDir>/packages/components/dist/index.js',
'@jpmorganchase/mosaic-store': '<rootDir>/packages/store/dist/index.js',
'@jpmorganchase/mosaic-theme': '<rootDir>/packages/theme/dist/index.js',
'^d3$': '<rootDir>/node_modules/d3/dist/d3.min.js',
'^lodash-es$': 'lodash'
};
module.exports = {
displayName: 'Client Tests',
...sharedConfig,
testEnvironment: 'jsdom',
moduleNameMapper,
setupFiles: ['./scripts/jest/client/jest.setup.js'],
setupFilesAfterEnv: ['./scripts/jest/client/jest.environment.js'],
// Add tests paths to roots
roots: [
'<rootDir>/__mocks__',
'<rootDir>/packages/components',
'<rootDir>/packages/content-editor-plugin',
'<rootDir>/packages/site-components',
'<rootDir>/packages/sitemap-component',
'<rootDir>/packages/store'
]
};