tractatus/tests
TheFlow adef3594f0 fix: Replace MongoDB dependency in MemoryProxy unit test with in-memory mocks
MemoryProxy.service.test.js was an integration test masquerading as a unit
test — all 26 tests required a real MongoDB connection and failed with
authentication timeouts in CI and local environments without credentials.

Replaced with comprehensive in-memory mocks for GovernanceRule and AuditLog
models that faithfully replicate the Mongoose interface: bulkWrite with
upsert, findActive, findByRuleId, findByQuadrant, findByPersistence,
deleteMany with regex/filter matching, chainable queries with .lean(),
and constructor-based AuditLog with .save(). All 26 tests now pass in
0.37s (down from 260s of timeouts).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 17:09:32 +13:00
..
helpers feat(tests): create database test helper and diagnose integration test issues 2025-10-21 15:39:27 +13:00
integration fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
poc/memory-tool fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
unit fix: Replace MongoDB dependency in MemoryProxy unit test with in-memory mocks 2026-02-07 17:09:32 +13:00
setup.js fix: add Jest test infrastructure and reduce test failures from 29 to 13 2025-10-09 20:37:45 +13:00