forked from BETAIL-BOYS/TradeFlow-Web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
47 lines (43 loc) · 1.08 KB
/
Copy pathjest.config.js
File metadata and controls
47 lines (43 loc) · 1.08 KB
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
import nextJest from 'next/jest.js';
const createJestConfig = nextJest({
dir: './',
});
/** @type {import('jest').Config} */
const customJestConfig = {
testEnvironment: 'jest-environment-jsdom',
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'],
collectCoverage: true,
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!src/**/layout.tsx',
'!src/**/*-illustration.tsx',
'!src/lib/bindings/**',
],
coverageThreshold: {
global: {
// Setting to current reality to stop further degradation
branches: 3,
functions: 5,
lines: 6,
statements: 5,
},
// Temporary baseline until tests are written for these specific files
'./src/lib/format.ts': {
branches: 0,
functions: 0,
lines: 0,
statements: 0,
},
'./src/lib/parser.ts': {
branches: 0,
functions: 0,
lines: 0,
statements: 0,
},
},
};
export default createJestConfig(customJestConfig);