mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-07-30 17:59:13 -04:00
31 lines
851 B
JavaScript
31 lines
851 B
JavaScript
module.exports = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'node',
|
|
|
|
rootDir: '.',
|
|
testMatch: ['<rootDir>/tests/**/*.test.ts', '<rootDir>/tests/**/*.spec.ts'],
|
|
|
|
moduleNameMapper: {
|
|
'^api/(.*)$': '<rootDir>/src/$1',
|
|
'^shared/(.*)$': '<rootDir>/../shared/src/$1',
|
|
'^common/(.*)$': '<rootDir>/../../common/src/$1',
|
|
'^email/(.*)$': '<rootDir>/../email/emails/$1',
|
|
},
|
|
|
|
moduleFileExtensions: ['ts', 'js', 'json'],
|
|
clearMocks: true,
|
|
|
|
globals: {
|
|
'ts-jest': {
|
|
tsconfig: '<rootDir>/tsconfig.test.json',
|
|
},
|
|
},
|
|
|
|
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/**/*.d.ts'],
|
|
silent: true,
|
|
// Each ts-jest worker is a full TS-compiling process; the default (cpus - 1) can spawn enough
|
|
// of them in parallel to exhaust memory on high-core-count machines.
|
|
maxWorkers: '50%',
|
|
workerIdleMemoryLimit: '512MB',
|
|
}
|