fix: eliminate cross-file mock.module pollution — complete exports for all mocked modules

This commit is contained in:
2026-03-09 03:26:22 -05:00
parent ad7507d133
commit 97ac4a2173
4 changed files with 84 additions and 45 deletions
+6
View File
@@ -92,6 +92,12 @@ const mockCheckColdStatus = mock(() => ({ cold: false, triggeredBy: null }));
mock.module("../../src/modules/algorithms/algo.coldThreshold", () => ({
checkColdStatus: mockCheckColdStatus,
// Include all named exports to avoid poisoning other test files that
// import COLD_THRESHOLDS or types from this module.
COLD_THRESHOLDS: {
43: { days: 14, ms: 14 * 24 * 60 * 60 * 1000 },
57: { days: 30, ms: 30 * 24 * 60 * 60 * 1000 },
},
}));
// ---------------------------------------------------------------------------