-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.base.js
31 lines (31 loc) · 1001 Bytes
/
jest.config.base.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
const path = require('path');
module.exports = {
runner: 'jest-electron/runner',
testEnvironment: 'jest-electron/environment',
setupFilesAfterEnv: ['jest-extended', './__tests__/setup.js'],
clearMocks: true,
collectCoverage: false,
collectCoverageFrom: [
'src/**/*.{ts,tsx,js,vue}',
'!**/node_modules/**',
'!**/interface/**',
'!**/interface.ts',
],
coverageReporters: ['text', 'clover', 'html'],
transformIgnorePatterns: [],
testRegex: '/__tests__/*.*(-|\\.)spec\\.(tsx|ts|js|vue)?$',
transform: {
'\\.(t|j)sx?$': '@swc/jest',
'\\.vue$': 'vue-jest',
'\\.(less|css)$': 'jest-less-loader',
'\\.svg$': 'jest-raw-loader',
},
moduleNameMapper: {
'^@/(.*)': '<rootDir>/src/$1',
'^tests/(.*)': '<rootDir>/__tests__/$1',
'^@antv/s2$': path.join(__dirname, 'packages/s2-core/src'),
'^@antv/s2-shared$': path.join(__dirname, 'packages/s2-shared/src'),
'\\.svg$': '<rootDir>/__tests__/__mocks__/svg.ts',
},
testTimeout: 30000,
};