forked from Sphereon-Opensource/SIOP-OID4VP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.cjs
38 lines (37 loc) · 1.09 KB
/
jest.config.cjs
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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
resolver: "jest-resolver-enhanced",
moduleNameMapper: {
'^jose/(.*)$': '<rootDir>/node_modules/jose/dist/node/cjs/$1',
// "multiformats": require.resolve("multiformats"),
},
rootDir: '.',
roots: ['<rootDir>/src/', '<rootDir>/test/'],
testMatch: ['**/?(*.)+(spec|test).+(ts|tsx|js)'],
transform: {
'^.+\\.(ts|tsx)?$': 'ts-jest',
'^.+\\.(js|jsx)$': [
'babel-jest', {
'presets': ['@babel/preset-env'],
'plugins': [
['@babel/transform-runtime'],
['@babel/plugin-transform-modules-commonjs']
]
}]
},
transformIgnorePatterns: ['/node_modules/(?!(@cef-ebsi|.*multiformats.*)/)'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
coverageDirectory: './coverage/',
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/schemas/**',
'!src/**/*.d.ts',
'!**/node_modules/**',
'!jest.config.cjs',
'!generator/**',
'!index.ts'
],
collectCoverage: true,
reporters: ['default', ['jest-junit', { outputDirectory: './coverage' }]]
};