tgfs/jest.config.js

22 lines
684 B
JavaScript
Raw Normal View History

module.exports = {
2023-07-09 14:36:53 +00:00
moduleFileExtensions: ['js', 'json', 'ts'],
rootDir: '.',
2023-07-25 12:18:10 +00:00
setupFiles: ['<rootDir>/test/utils/mock-tg-client.ts'],
2023-07-28 17:03:46 +00:00
testMatch: ['<rootDir>/test/**/*.spec.(t|j)s'],
transform: {
2023-07-09 14:36:53 +00:00
'^.+\\.(t|j)s$': 'ts-jest',
},
collectCoverageFrom: ['src/**/*.(t|j)s'],
coverageDirectory: './coverage',
testEnvironment: 'node',
moduleNameMapper: {
'^~test/(.*)': '<rootDir>/test/$1',
'^~/(.*)': '<rootDir>/src/$1',
'^src/(.*)': '<rootDir>/src/$1',
},
2023-07-09 14:36:53 +00:00
roots: ['<rootDir>'],
moduleDirectories: ['node_modules'],
// Needed for memory leak issue with NodeJS 16. See https://github.com/facebook/jest/issues/11956
workerIdleMemoryLimit: '50M',
};