-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.js
41 lines (39 loc) · 1.14 KB
/
jest.config.js
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
34
35
36
37
38
39
40
41
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const dirname = path.dirname(fileURLToPath(import.meta.url));
export default {
verbose: true,
testEnvironment: 'node',
setupFilesAfterEnv: ['jest-extended/all'],
collectCoverage: false,
testMatch: [
'<rootDir>/test/**/*-spec.{ts,js}',
'<rootDir>/test/*-spec.{ts,js}',
],
moduleNameMapper: {
'^terafoundation_kafka_connector$': path.join(dirname, '/packages/terafoundation_kafka_connector/src/index.ts'),
'^(\\.{1,2}/.*)\\.js$': '$1',
},
preset: 'ts-jest',
extensionsToTreatAsEsm: ['.ts'],
globals: {
'ts-jest': {
tsconfig: './tsconfig.json',
diagnostics: true,
useESM: true
},
ignoreDirectories: ['dist'],
availableExtensions: ['.js', '.ts', '.mjs']
},
transform: {
'\\.[jt]sx?$': ['ts-jest',
{
isolatedModules: true,
tsconfig: './tsconfig.json',
diagnostics: true,
pretty: true,
useESM: true
}]
},
testTimeout: 60 * 1000
};