MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / resetDbSingleton

Function resetDbSingleton

tests/failure-paths/database.failure.test.js:7–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import { pgDb } from '../../src/utils/postgresDatabase.js';
6
7function resetDbSingleton() {
8 db.initialized = false;
9 db.db = null;
10 db.useFallback = false;
11 db.connectionType = 'none';
12 db.degradedModeWarningShown = false;
13 db.degradedReason = null;
14}
15
16test('DB down path falls back to memory with degraded status', async () => {
17 const originalConnect = pgDb.connect;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected