forked from StellarDevHub/Web3-Student-Lab
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.js
More file actions
30 lines (29 loc) · 733 Bytes
/
Copy pathjest.config.js
File metadata and controls
30 lines (29 loc) · 733 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
/** @type {import('ts-jest').JestConfigWithTsJest} */
process.env.NODE_ENV = 'test';
export default {
setupFiles: [
'dotenv/config',
'<rootDir>/jest.setup.js',
'<rootDir>/tests/jest.setup.ts',
],
preset: 'ts-jest',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true,
isolatedModules: true,
},
],
},
testMatch: ['**/tests/**/*.test.ts'],
collectCoverageFrom: ['src/**/*.ts', '!src/**/*.d.ts'],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
};