Commit Graph

2 Commits

Author SHA1 Message Date
6b7ea745d8 test(core): Add comprehensive tests for core catalog services
- 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>
2026-01-18 09:21:22 -06:00
301628f759 test(fase2): Add unit tests for FASE 2 modules
Add comprehensive unit tests for Business Core modules:
- Partners: 22 tests (CRUD, filters, tenant isolation)
- Products: 23 tests (CRUD, categories, search)
- Invoices: 31 tests (CRUD, payments, state transitions)
- Warehouses: 24 tests (CRUD, locations, default handling)
- HR Employees: 24 tests (CRUD, terminate/reactivate, subordinates)

Test infrastructure:
- jest.config.js with ts-jest and ESM support
- setup.ts with mocks for AppDataSource and database
- helpers.ts with factory functions for test data

Total: 114 tests passing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 04:18:40 -06:00