Skip to content

Commit 0e77cb5

Browse files
committed
feat: add base structure for Jest
Signed-off-by: Vitor Hugo Salgado <[email protected]>
1 parent 3002aac commit 0e77cb5

File tree

3 files changed

+8855
-2834
lines changed

3 files changed

+8855
-2834
lines changed

jest.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
'use strict'
2+
3+
module.exports = {
4+
verbose: true,
5+
collectCoverage: false,
6+
restoreMocks: true,
7+
transform: { '^.+\\.tsx?$': 'ts-jest' },
8+
globals: {
9+
'ts-jest': {
10+
tsconfig: './tsconfig.test.json'
11+
}
12+
},
13+
projects: ['<rootDir>'],
14+
collectCoverageFrom: ['**/src/*/**/*.ts', '!**/__fixtures__/**', '!**/__tests__/**'],
15+
coveragePathIgnorePatterns: ['<rootDir>/dist/', '/node_modules/', '<rootDir>/scripts', '<rootDir>/tools'],
16+
testPathIgnorePatterns: ['<rootDir>/dist/', '/node_modules/', '<rootDir>/scripts', '<rootDir>/tools'],
17+
moduleNameMapper: {
18+
'^@app/(.*)$': '<rootDir>/src/$1'
19+
},
20+
coverageThreshold: {
21+
global: {
22+
branches: 60,
23+
functions: 60,
24+
lines: 60,
25+
statements: 60
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)