-
Notifications
You must be signed in to change notification settings - Fork 257
/
jest.config.js
33 lines (32 loc) · 1.5 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
const path = require('path');
module.exports = {
// Map workspaces to their source code so that Jest can resolve them correctly.
moduleNameMapper: {
'^@moralisweb3/evm-api': path.join(__dirname, 'packages/evmApi/src'),
'^@moralisweb3/sol-api': path.join(__dirname, 'packages/solApi/src'),
'^@moralisweb3/common-aptos-utils': path.join(__dirname, 'packages/common/aptosUtils/src'),
'^@moralisweb3/common-sol-utils': path.join(__dirname, 'packages/common/solUtils/src'),
'^@moralisweb3/common-evm-utils': path.join(__dirname, 'packages/common/evmUtils/src'),
'^@moralisweb3/api-utils': path.join(__dirname, 'packages/apiUtils/src'),
'^@moralisweb3/test-utils': path.join(__dirname, 'packages/testUtils/src'),
'^@moralisweb3/common-streams-utils': path.join(__dirname, 'packages/common/streamsUtils/src'),
'^@moralisweb3/common-auth-utils': path.join(__dirname, 'packages/common/authUtils/src'),
'^@moralisweb3/common-core': path.join(__dirname, 'packages/common/core/src'),
'^@moralisweb3/(.*)$': path.join(__dirname, 'packages/$1/src'),
},
modulePaths: ['<rootDir>'],
preset: 'ts-jest/presets/default',
collectCoverageFrom: ['**/src/**/*.{js,ts,jsx,tsx}'],
coverageThreshold: null,
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: path.join(__dirname, 'tsconfig.package.json'),
},
],
},
verbose: true,
coverageReporters: ['clover', 'json', 'lcov', 'text', 'json-summary'],
coveragePathIgnorePatterns: ['.mock.ts', 'src/index.ts'],
};