-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
40 lines (38 loc) · 1.01 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
const path = require('path');
const projectCommonConfig = {
transform: {
'^.+\\.[tj]sx?$': [
'ts-jest',
{
tsconfig: 'tsconfig.common.json',
},
],
},
clearMocks: true,
resolver: `${__dirname}/jest.resolver.js`,
preset: 'ts-jest',
setupFilesAfterEnv: ['jest-extended/all'],
};
module.exports = {
rootDir: __dirname,
coverageDirectory: path.join(process.cwd(), 'coverage'),
collectCoverageFrom: ['packages/**/*.{jsx,ts,tsx}', '!**/*.d.ts', '!**/*.{test,setup}.{jsx,ts,tsx}'],
coverageProvider: 'v8',
projects: [
{
displayName: 'sdk',
testMatch: ['<rootDir>/packages/sdk/src/**/*.test.ts*'],
...projectCommonConfig,
},
{
displayName: 'server-provider',
testMatch: ['<rootDir>/packages/openfeature-server-provider/src/**/*.test.ts*'],
...projectCommonConfig,
},
{
displayName: 'web-provider',
testMatch: ['<rootDir>/packages/openfeature-web-provider/src/**/*.test.ts*'],
...projectCommonConfig,
},
],
};