mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
0148631d28
* upgrade ts-node * move tslint and typescript to a single place * source-map-support should be loaded in the `n8n` bin script, and not in core * upgrade jest * Support only node.js 14, 16, or 18
26 lines
529 B
JavaScript
26 lines
529 B
JavaScript
const { compilerOptions } = require('./tsconfig.json');
|
|
|
|
const tsJestOptions = {
|
|
isolatedModules: true,
|
|
tsconfig: {
|
|
...compilerOptions,
|
|
declaration: false,
|
|
sourceMap: false,
|
|
skipLibCheck: true,
|
|
},
|
|
};
|
|
|
|
/** @type {import('jest').Config} */
|
|
module.exports = {
|
|
verbose: true,
|
|
testEnvironment: 'node',
|
|
testRegex: '\\.(test|spec)\\.(js|ts)$',
|
|
testPathIgnorePatterns: ['/dist/', '/node_modules/'],
|
|
transform: {
|
|
'^.+\\.ts$': ['ts-jest', tsJestOptions],
|
|
},
|
|
moduleNameMapper: {
|
|
'^@/(.*)$': '<rootDir>/src/$1',
|
|
},
|
|
};
|