- Add tests for countries.service.ts (findAll, findById, create, update) - Add tests for currencies.service.ts (CRUD, rates, conversion) - Add tests for states.service.ts (CRUD, country filtering) - Add tests for uom.service.ts (CRUD, conversion, categories) - Add mock factories for core entities (Country, State, Currency, etc.) - Fix Jest config for proper CJS/TS interop - All 592 tests passing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
31 lines
718 B
JavaScript
31 lines
718 B
JavaScript
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
module.exports = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'node',
|
|
roots: ['<rootDir>/src'],
|
|
testMatch: [
|
|
'**/__tests__/**/*.test.ts',
|
|
'**/__tests__/**/*.spec.ts',
|
|
],
|
|
transform: {
|
|
'^.+\\.tsx?$': ['ts-jest', {
|
|
tsconfig: 'tsconfig.json',
|
|
isolatedModules: true,
|
|
}],
|
|
},
|
|
moduleNameMapper: {
|
|
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
},
|
|
collectCoverageFrom: [
|
|
'src/**/*.ts',
|
|
'!src/**/*.d.ts',
|
|
'!src/**/index.ts',
|
|
'!src/config/**',
|
|
],
|
|
coverageDirectory: 'coverage',
|
|
coverageReporters: ['text', 'lcov', 'html'],
|
|
setupFilesAfterEnv: ['<rootDir>/src/__tests__/setup.ts'],
|
|
testTimeout: 30000,
|
|
verbose: true,
|
|
};
|