-
Notifications
You must be signed in to change notification settings - Fork 4
/
jest.config.sdk.js
54 lines (54 loc) · 1.46 KB
/
jest.config.sdk.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
42
43
44
45
46
47
48
49
50
51
52
53
54
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
collectCoverage: true,
collectCoverageFrom: ['src/**'],
coverageDirectory: 'coverage/sdk/',
coveragePathIgnorePatterns: [
'/node_modules/',
'/test/',
'/*.types.ts',
'/src/index.ts',
],
coverageThreshold: {
'./src': {
branches: 80, // make this above 80
functions: 95,
lines: 95,
},
},
coverageReporters: [
'json-summary',
'html',
'text',
'text-summary',
'cobertura',
],
testPathIgnorePatterns: ['/lib/', '/docs/', '/cjs/'],
testMatch: ['<rootDir>/src/**/*.spec.(ts|tsx)'],
setupFilesAfterEnv: ['<rootDir>/jest-setup.js'],
globals: {
window: {
location: {
protocol: 'https:',
},
},
'ts-jest': {
diagnostics: {
ignoreCodes: [1343],
},
astTransformers: {
before: [
{
path: 'node_modules/ts-jest-mock-import-meta', // or, alternatively, 'ts-jest-mock-import-meta' directly, without node_modules.
options: {
metaObjectReplacement: {
url: 'https://www.url.com',
},
},
},
],
},
},
},
};