forked from ninecat-ui/ninecat-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.jest.js
34 lines (33 loc) · 1.05 KB
/
.jest.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
const transformIgnorePatterns = [
'/dist/',
];
const testPathIgnorePatterns = ['/node_modules/', 'node'];
if (process.env.WORKFLOW === 'true') {
testPathIgnorePatterns.push('demo\\.test*');
}
module.exports = {
testURL: 'http://localhost/',
setupFiles: ['./test/setup.js'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'vue', 'md', 'jpg'],
modulePathIgnorePatterns: ['/_site/'],
testPathIgnorePatterns: testPathIgnorePatterns,
transform: {
'^.+\\.(vue|md)$': '<rootDir>/node_modules/vue-jest',
'^.+\\.(js|jsx)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.(ts|tsx)$': '<rootDir>/node_modules/ts-jest',
'^.+\\.svg$': '<rootDir>/node_modules/jest-transform-stub',
},
// testRegex: '.*\\.test\\.js$',
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'\\.(scss|sass|css)$': 'identity-obj-proxy'
},
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
testEnvironment: 'jest-environment-jsdom-fifteen',
transformIgnorePatterns,
globals: {
'ts-jest': {
babelConfig: true,
},
},
};