forked from pterodactyl/panel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
28 lines (27 loc) · 867 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
26
27
28
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig');
/** @type {import('ts-jest').InitialOptionsTsJest} */
module.exports = {
preset: 'ts-jest',
globals: {
'ts-jest': {
isolatedModules: true,
},
},
moduleFileExtensions: ['js', 'ts', 'tsx', 'd.ts', 'json', 'node'],
moduleNameMapper: {
'\\.(jpe?g|png|gif|svg)$': '<rootDir>/resources/scripts/__mocks__/file.ts',
'\\.(s?css|less)$': 'identity-obj-proxy',
...pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
},
setupFilesAfterEnv: [
'<rootDir>/resources/scripts/setup-tests.ts',
],
transform: {
'.*\\.[t|j]sx$': 'babel-jest',
'.*\\.ts$': 'ts-jest',
},
testPathIgnorePatterns: ['/node_modules/'],
};