n8n/jest.config.js
कारतोफ्फेलस्क्रिप्ट™ 11b75c02ea
ci: Update Jest setup on the CI to avoid OOM errors (no-changelog) (#5042)
2022-12-28 09:58:14 +01:00

33 lines
651 B
JavaScript

const { compilerOptions } = require('./tsconfig.json');
const tsJestOptions = {
isolatedModules: true,
tsconfig: {
...compilerOptions,
declaration: false,
sourceMap: false,
skipLibCheck: true,
},
};
/** @type {import('jest').Config} */
const config = {
verbose: true,
testEnvironment: 'node',
testRegex: '\\.(test|spec)\\.(js|ts)$',
testPathIgnorePatterns: ['/dist/', '/node_modules/'],
transform: {
'^.+\\.ts$': ['ts-jest', tsJestOptions],
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
};
if (process.env.CI === 'true') {
config.maxWorkers = 2;
config.workerIdleMemoryLimit = 2048;
}
module.exports = config;