mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-27 13:39:44 -08:00
33 lines
650 B
JavaScript
33 lines
650 B
JavaScript
const { compilerOptions } = require('./tsconfig.json');
|
|
|
|
const tsJestOptions = {
|
|
isolatedModules: true,
|
|
tsconfig: {
|
|
...compilerOptions,
|
|
declaration: false,
|
|
sourceMap: true,
|
|
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;
|