-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjest.config.ts
More file actions
27 lines (26 loc) · 1005 Bytes
/
jest.config.ts
File metadata and controls
27 lines (26 loc) · 1005 Bytes
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
const config = {
preset: '@shelf/jest-mongodb',
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
transform: {
'^.+\\.(mjs|js|jsx)$': 'babel-jest',
'^.+\\.(ts|tsx)$': 'ts-jest',
},
moduleFileExtensions: ['js', 'jsx', 'mjs', 'ts', 'tsx'],
moduleNameMapper: {
'@globals/(.*)': '<rootDir>/app/(pages)/_globals/$1',
'@components/(.*)': '<rootDir>/app/(pages)/_components/$1',
//specific for tracks import since it dont deal with images
'@data/tracks': '<rootDir>/__mocks__/tracks.ts',
// general
'@data/(.*)': '<rootDir>/app/_data/$1',
'@hooks/(.*)': '<rootDir>/app/(pages)/_hooks/$1',
'@actions/(.*)': '<rootDir>/app/(api)/_actions/$1',
'@utils/(.*)': '<rootDir>/app/(api)/_utils/$1',
'@apidata/(.*)': '<rootDir>/app/(api)/_data/$1',
'@datalib/(.*)': '<rootDir>/app/(api)/_datalib/$1',
'@typeDefs/(.*)': '<rootDir>/app/_types/$1',
'@/auth': '<rootDir>/auth.ts',
'@public/(.*)': '<rootDir>/public/$1',
},
};
export default config;