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