tractatus/tests/unit
TheFlow 1fdefd9ba8 fix(tests): update MemoryProxy tests for v3 MongoDB architecture
PROBLEM: Tests written for filesystem-based v1/v2, but service refactored to MongoDB v3
- 18/25 tests failing (expected filesystem, got MongoDB)
- Tests checking for .json files that no longer exist
- Response format mismatches (rulesStored vs inserted/modified)

SOLUTION: Complete test rewrite for MongoDB architecture
- Use GovernanceRule and AuditLog models directly
- Test data isolation with test_ prefix and cleanup hooks
- Updated assertions for MongoDB response formats
- Filter results to exclude non-test data from tractatus_test DB
- Removed filesystem-specific tests (directory creation, file I/O)

RESULT: 26/26 tests passing in 1.079s (from 7/25 in 250s timeout)

Tests now verify:
✓ MongoDB persistence and retrieval
✓ Rule filtering (quadrant, persistence)
✓ Cache management (TTL, clear, stats)
✓ Audit logging to MongoDB
✓ Data integrity across persist/load cycles

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 12:14:57 +13:00
..
services feat: implement Rule Manager and Project Manager admin systems 2025-10-11 17:16:51 +13:00
AdaptiveCommunicationOrchestrator.test.js test(unit): add comprehensive tests for value pluralism services 2025-10-12 16:35:30 +13:00
BlogCuration.service.test.js fix: MongoDB persistence and inst_016-018 content validation enforcement 2025-10-11 00:17:03 +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 test: increase coverage for ClaudeAPI and koha services (9% → 86%) 2025-10-09 21:17:32 +13:00
ContextPressureMonitor.test.js docs: regenerate PDFs and update documentation metadata 2025-10-14 10:53:48 +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 test: increase coverage for ClaudeAPI and koha services (9% → 86%) 2025-10-09 21:17:32 +13:00
markdown.util.test.js test: add comprehensive coverage for governance and markdown utilities 2025-10-09 21:32:13 +13:00
MemoryProxy.service.test.js fix(tests): update MemoryProxy tests for v3 MongoDB architecture 2025-10-21 12:14:57 +13:00
MetacognitiveVerifier.test.js feat: achieve 100% test coverage - MetacognitiveVerifier improvements 2025-10-07 11:03:49 +13:00
PluralisticDeliberationOrchestrator.test.js test(unit): add comprehensive tests for value pluralism services 2025-10-12 16:35:30 +13:00