forked from aboutmydreams/aiis.read
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
34 lines (34 loc) · 1.03 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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
moduleNameMapper: {
'\\.(scss|sass|css)$': 'identity-obj-proxy',
'^@/(.*)$': '<rootDir>/src/$1',
'lodash-es': 'lodash',
},
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
globals: {
'ts-jest': {
diagnostics: {
ignoreCodes: [1343],
},
astTransformers: {
before: [
{
path: 'node_modules/ts-jest-mock-import-meta', // or, alternatively, 'ts-jest-mock-import-meta' directly, without node_modules.
options: {
metaObjectReplacement: {
env: {
VITE_SOCKET_BASE_URL: 'wss://dev-chat-xfans-api.buidlerdao.xyz',
VITE_ROOM_BASE_URL: 'https://dev-chat-xfans-api.buidlerdao.xyz',
VITE_CONTRACT_BASE_URL: 'https://test-mpc-xfans-api.buidlerdao.xyz',
VITE_BASE_URL: 'https://test-xfans-api.d.buidlerdao.xyz',
},
},
},
},
],
},
},
},
};