-
Notifications
You must be signed in to change notification settings - Fork 84
/
jest.config.ts
50 lines (49 loc) · 1.81 KB
/
jest.config.ts
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
/* eslint-disable */
import type { Config } from 'jest'
export default async (): Promise<Config> => {
return {
verbose: true,
testEnvironment: 'jsdom',
setupFiles: ['<rootDir>/src/tests/beforeSetupTests.ts', 'jest-canvas-mock'],
setupFilesAfterEnv: ['<rootDir>/src/tests/afterSetupTest.ts'],
transform: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/src/tests/config/fileTransformer.cjs',
'^.+\\.(t|j)sx?$': [
'@swc/jest',
{
jsc: {
transform: {
react: {
runtime: 'automatic'
}
}
}
}
]
},
testRegex: '(/__tests__/.*|(\\.|/)(spec))\\.[jt]sx?$',
moduleNameMapper: {
'^three/.*$': 'identity-obj-proxy',
'decentraland-ecs': 'identity-obj-proxy',
'^.*/modules/curations/collectionCuration/toasts.*$': 'identity-obj-proxy',
'@dcl/ecs': 'identity-obj-proxy',
'^.+?raw': 'identity-obj-proxy',
'@dcl/single-sign-on-client': 'identity-obj-proxy',
'\\.(css|less)$': 'identity-obj-proxy',
'^components/(.*)$': '<rootDir>/src/components/$1',
'^config$': '<rootDir>/src/config',
'^contracts(/.*)$': '<rootDir>/src/contracts/$1',
'^contracts$': '<rootDir>/src/contracts',
'^ecsScene/(.*)$': '<rootDir>/src/ecsScene/$1',
'^experiments/(.*)$': '<rootDir>/src/experiments/$1',
'^icons/(.*)$': '<rootDir>/src/icons/$1',
'^images/(.*)$': '<rootDir>/src/images/$1',
'^lib/(.*)$': '<rootDir>/src/lib/$1',
'^modules/(.*)$': '<rootDir>/src/modules/$1',
'^routing/(.*)$': '<rootDir>/src/routing/$1',
'^specs/(.*)$': '<rootDir>/src/specs/$1'
},
transformIgnorePatterns: ['node_modules/?!@0xsquid|eccrypto|libsodium-wrappers-sumo']
}
}