forked from PolymeshAssociation/polymesh-rest-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
22 lines (22 loc) · 990 Bytes
/
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
module.exports = {
preset: 'ts-jest/presets/js-with-babel',
transformIgnorePatterns: ['/node_modules/(?![@polymeshassociation/src]).+\\.js$'],
testEnvironment: 'node',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testPathIgnorePatterns: ['<rootDir>/dist/*', '<rootDir>/src/polymesh-rest-api/*'],
moduleNameMapper: {
'~/app.module': '<rootDir>/src/app.module',
'~/confidential(.*)': '<rootDir>/src/confidential$1',
'~/extended(.*)': '<rootDir>/src/extended$1',
'~/middleware/(.*)': '<rootDir>/src/confidential-middleware/$1',
'~/test-utils/(.*)': '<rootDir>/src/test-utils/$1',
'~/polymesh/(.*)': '<rootDir>/src/polymesh/$1',
'~/transactions/(.*)': '<rootDir>/src/transactions/$1',
'~/polymesh-rest-api/(.*)': '<rootDir>/src/polymesh-rest-api/$1',
'~/(.*)': '<rootDir>/src/polymesh-rest-api/src/$1',
},
testRegex: '.*\\.spec\\.ts$',
coverageDirectory: './coverage',
collectCoverage: true,
restoreMocks: true,
};