tractatus/tests/unit
TheFlow 8e72ecd549 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
..
services feat: implement Rule Manager and Project Manager admin systems 2025-10-11 17:16:51 +13:00
AdaptiveCommunicationOrchestrator.test.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
BlogCuration.service.test.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
BoundaryEnforcer.test.js fix: MongoDB persistence and inst_016-018 content validation enforcement 2025-10-11 00:17:03 +13:00
ClaudeAPI.test.js fix: Resolve stale CSS caching and CI test failure 2026-02-07 16:10:29 +13:00
ContextPressureMonitor.test.js fix: Add async/await to pressure monitoring and framework tests 2025-12-09 13:45:33 +13:00
CrossReferenceValidator.test.js test: add comprehensive unit test suite for Tractatus governance services 2025-10-07 01:11:21 +13:00
InstructionPersistenceClassifier.test.js test: add comprehensive unit test suite for Tractatus governance services 2025-10-07 01:11:21 +13:00
koha.service.test.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
markdown.util.test.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
MemoryProxy.service.test.js fix: Replace MongoDB dependency in MemoryProxy unit test with in-memory mocks 2026-02-07 17:09:32 +13:00
MetacognitiveVerifier.test.js fix: Add async/await to pressure monitoring and framework tests 2025-12-09 13:45:33 +13:00
PluralisticDeliberationOrchestrator.test.js test(unit): add comprehensive tests for value pluralism services 2025-10-12 16:35:30 +13:00
ProhibitedTermsScanner.test.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00