forked from VolunChain/VolunChain-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
33 lines (32 loc) · 761 Bytes
/
jest.config.ts
File metadata and controls
33 lines (32 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const { config } = require('dotenv');
config({ path: '.env.test' });
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/tests'],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: './tsconfig.json',
},
],
},
testMatch: [
'**/tests/**/*.test.ts',
'**/__tests__/**/*.test.ts',
'(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
collectCoverageFrom: [
'src/**/*.{js,ts}',
'!**/node_modules/**',
'!**/tests/**',
],
coverageDirectory: 'coverage',
testTimeout: 30000,
};