refactor(flags): move channel db flag to runtime flags (#27615)

This commit is contained in:
Shoubhit Dash
2026-05-15 04:09:10 +05:30
committed by GitHub
parent cb4f5cdea9
commit fc34c74567
8 changed files with 93 additions and 52 deletions

View File

@@ -5,7 +5,8 @@ import { disposeAllInstances } from "./fixture"
export async function resetDatabase() {
await disposeAllInstances().catch(() => undefined)
Database.close()
await rm(Database.Path, { force: true }).catch(() => undefined)
await rm(`${Database.Path}-wal`, { force: true }).catch(() => undefined)
await rm(`${Database.Path}-shm`, { force: true }).catch(() => undefined)
const dbPath = Database.getPath()
await rm(dbPath, { force: true }).catch(() => undefined)
await rm(`${dbPath}-wal`, { force: true }).catch(() => undefined)
await rm(`${dbPath}-shm`, { force: true }).catch(() => undefined)
}