Replace Instance.disposeAll/load with fixture helper (#25418)

This commit is contained in:
Kit Langton
2026-05-02 10:56:15 -04:00
committed by GitHub
parent 4f3b7b7333
commit 6c85bbc7f0
59 changed files with 139 additions and 130 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
import { rm } from "fs/promises"
import { Instance } from "../../src/project/instance"
import { Database } from "@/storage/db"
import { disposeAllInstances } from "./fixture"
export async function resetDatabase() {
await Instance.disposeAll().catch(() => undefined)
await disposeAllInstances().catch(() => undefined)
Database.close()
await rm(Database.Path, { force: true }).catch(() => undefined)
await rm(`${Database.Path}-wal`, { force: true }).catch(() => undefined)