forked from abraham-musa/developer-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
visual.jest.config.js
37 lines (37 loc) · 996 Bytes
/
visual.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
module.exports = {
displayName: 'Visual Regression Tests',
name: 'visual',
preset: 'jest-puppeteer',
testURL: process.env.TEST_HOST || 'http://localhost:4444',
testMatch: ['<rootDir>/src/visualRegressionTest.ts'],
setupFiles: ['<rootDir>/config/polyfills.js'],
setupFilesAfterEnv: ['<rootDir>/config/jest/imageSnapshot.ts'],
transform: {
'^.+\\.(js|jsx|mjs)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
'^(?!.*\\.(js|jsx|mjs|css|json)$)': '<rootDir>/config/jest/fileTransform.js',
},
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|ts|tsx)$'],
moduleNameMapper: {
'^react-native$': 'react-native-web',
},
moduleFileExtensions: [
'web.ts',
'ts',
'web.tsx',
'tsx',
'web.js',
'js',
'web.jsx',
'jsx',
'json',
'node',
'mjs',
],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
},
},
};