- Added explanation for logger mocking in tests/setup.ts - Removed test files from coverage collection in jest.config.js - Updated tests/README.md to clarify coverage approach and remove outdated threshold reference Co-authored-by: mindesbunister <32161838+mindesbunister@users.noreply.github.com>
29 lines
632 B
JavaScript
29 lines
632 B
JavaScript
/** @type {import('jest').Config} */
|
|
const config = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'node',
|
|
roots: ['<rootDir>/tests'],
|
|
testMatch: ['**/*.test.ts'],
|
|
transform: {
|
|
'^.+\\.tsx?$': ['ts-jest', {
|
|
useESM: true,
|
|
tsconfig: {
|
|
module: 'ESNext',
|
|
moduleResolution: 'node',
|
|
},
|
|
}],
|
|
},
|
|
moduleNameMapper: {
|
|
'^@/(.*)$': '<rootDir>/$1',
|
|
},
|
|
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
|
|
collectCoverageFrom: [
|
|
'lib/trading/position-manager.ts',
|
|
],
|
|
coverageReporters: ['text', 'text-summary', 'html'],
|
|
verbose: true,
|
|
testTimeout: 10000,
|
|
}
|
|
|
|
module.exports = config
|