forked from pdugan20/libby-downloader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
30 lines (30 loc) · 791 Bytes
/
jest.config.js
File metadata and controls
30 lines (30 loc) · 791 Bytes
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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
roots: ['<rootDir>/src'],
testMatch: ['**/__tests__/**/*.test.ts', '**/*.test.ts', '**/*.spec.ts'],
testPathIgnorePatterns: [
'/node_modules/',
'/__tests__/setup/',
],
setupFilesAfterEnv: ['<rootDir>/src/__tests__/setup/jest.setup.ts'],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/cli.ts', // Main CLI entry point
'!src/__tests__/**', // Exclude test files
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
coverageThreshold: {
global: {
branches: 20,
functions: 20,
lines: 25,
statements: 25,
},
},
moduleNameMapper: {
'^chalk$': '<rootDir>/src/__tests__/setup/mocks/chalk.mock.ts',
},
};