-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
25 lines (22 loc) · 881 Bytes
/
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
/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
moduleNameMapper: {
// if your using tsconfig.paths thers is no harm in telling jest
'@capitole/(.*)$': '<rootDir>/src/$1',
// mocking assests and styling
'^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/tests/mocks/fileMock.ts',
'^.+\\.(css|less|scss|sass)$': '<rootDir>/tests/mocks/styleMock.ts',
/* mock models and services folder */
'(assets|models|services)': '<rootDir>/tests/mocks/fileMock.ts',
},
// to obtain access to the matchers.
setupFilesAfterEnv: ['./tests/setupTests.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
modulePaths: ['<rootDir>'],
testEnvironment: "./jest.environment.js",
testEnvironmentOptions: {
customExportConditions: [''],
},
};