-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
35 lines (25 loc) · 936 Bytes
/
jest.config.ts
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
import type { Config } from '@jest/types';
// Jest configuration options
const config: Config.InitialOptions = {
// Clear mock calls between every test
clearMocks: true,
// Enable collecting code coverage information
collectCoverage: true,
// Directory where coverage information will be stored
coverageDirectory: 'coverage',
// Root directory for the project
rootDir: './src',
// Specify the preset used for the TypeScript compiler
preset: 'ts-jest',
// Specify the test environment
testEnvironment: 'node',
// List of file extensions Jest should look for
moduleFileExtensions: ['ts', 'js', 'json'],
// Regular expression pattern Jest uses to find test files
// This matches any file containing .spec.ts regardless of its location
testRegex: '(/|\\\\).*\\.spec\\.ts$',
// Display verbose output during test execution
verbose: true,
};
// Export Jest configuration
export default config;