-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathjest.config.js
More file actions
24 lines (24 loc) · 923 Bytes
/
jest.config.js
File metadata and controls
24 lines (24 loc) · 923 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
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
// Optional: If you have tests outside of src/ or tests/
// roots: ['<rootDir>/src', '<rootDir>/tests'],
// Optional: Match test files (adjust if your naming convention differs)
testMatch: ['**/?(*.)+(spec|test).+(ts|tsx)'],
// Ignore test files in annotations module
testPathIgnorePatterns: [
'/node_modules/',
'/src/modules/annotations/.*\\.(spec|test)\\.(ts|tsx)$',
],
// Optional: Module file extensions for importing
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
// Map 'src/*' paths to '<rootDir>/src/*'
moduleNameMapper: {
'^@semble/types$': '<rootDir>/src/types/src/index.ts',
'^src/(.*)$': '<rootDir>/src/$1',
},
// Increase timeout for tests that use containers
testTimeout: 60000,
setupFiles: ['<rootDir>/jest.setup.js'],
};