-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathjest.config.js
60 lines (59 loc) · 1.53 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// set timezone to UTC for consistent timestamp tests
process.env.TZ = 'UTC'
module.exports = {
preset: 'ts-jest',
setupFiles: [
'jest-canvas-mock',
'dotenv/config',
'./jest-setup.js',
'jsdom-worker',
],
collectCoverageFrom: [
'**/*.{ts,tsx}',
'!**/*.d.ts',
'!**/node_modules/**',
'!**/*.config.js',
'!**/*.config.ts',
'!**/config.ts',
'!**/startup.js',
'!**/*.eslintrc.js',
'!**/iridium/**',
'!**/*.disabled.ts',
'!**/linked-iridium/**',
],
moduleDirectories: ['node_modules', 'src'],
moduleNameMapper: {
'^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy',
'^.+\\.(css|sass|scss)$': '<rootDir>/__mocks__/styleMock.js',
'^.+\\.(jpg|jpeg|png|gif|webp|svg)$': '<rootDir>/__mocks__/fileMock.js',
'^[@|~]/(.*)$': '<rootDir>/$1',
skaler: '<rootDir>/store/__mocks__/skaler.js',
},
testPathIgnorePatterns: [
'<rootDir>/node_modules',
'<rootDir>/linked-iridium',
'<rootDir>/iridium',
'<rootDir>/cypress',
],
coveragePathIgnorePatterns: [
'<rootDir>/.nuxt',
'<rootDir>/cypress',
'<rootDir>/coverage',
'<rootDir>/plugins',
'<rootDir>/electron',
'<rootDir>/libraries/Enums',
'<rootDir>/libraries/Files/errors',
'<rootDir>/libraries/Files/types',
'<rootDir>/types',
'<rootDir>/iridium',
],
testEnvironment: 'jsdom',
transform: {
'^.+\\.(js|jsx|ts|tsx)$': ['babel-jest'],
},
transformIgnorePatterns: [
'/node_modules/',
'node_modules/(?!@mylibrary/)',
'^.+\\.module\\.(css|sass|scss)$',
],
}