-
Notifications
You must be signed in to change notification settings - Fork 282
/
jest.config.js
38 lines (38 loc) · 1.05 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
31
32
33
34
35
36
37
38
module.exports = {
transform: {
'^.+\\.js$': 'babel-jest',
'^.+\\.ts$': 'ts-jest',
'^.+\\.vue$': '@vue/vue2-jest',
},
transformIgnorePatterns: [
'/node_modules/(?!(yaml|jsonpath-plus|@kubernetes/client-node)/)',
],
moduleFileExtensions: [
'js',
'json',
'node', // For native modules, e.g. fs-xattr
'ts',
'vue',
],
modulePathIgnorePatterns: [
'<rootDir>/dist',
'<rootDir>/pkg/rancher-desktop/dist',
'<rootDir>/.git',
'<rootDir>/e2e',
'<rootDir>/screenshots',
],
moduleNameMapper: {
'\\.css$': '<rootDir>/pkg/rancher-desktop/config/emptyStubForJSLinter.js',
'^@pkg/assets/': '<rootDir>/pkg/rancher-desktop/config/emptyStubForJSLinter.js',
'^@pkg/(.*)$': '<rootDir>/pkg/rancher-desktop/$1',
},
preset: 'ts-jest/presets/js-with-babel',
setupFiles: [
'<rootDir>/pkg/rancher-desktop/utils/testUtils/setupElectron.ts',
],
testEnvironment: 'jsdom',
testPathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/pkg/rancher-desktop/sudo-prompt/',
],
};