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 5242a1c6b4
commit 4c4860fb24
59 changed files with 139 additions and 130 deletions

View File

@@ -1,5 +1,5 @@
import { AppRuntime } from "@/effect/app-runtime"
import { Instance } from "../project/instance"
import { InstanceStore } from "../project/instance-store"
export async function bootstrap<T>(directory: string, cb: () => Promise<T>) {
return Instance.provide({
@@ -9,7 +9,7 @@ export async function bootstrap<T>(directory: string, cb: () => Promise<T>) {
const result = await cb()
return result
} finally {
await Instance.dispose()
await InstanceStore.runtime.runPromise((s) => s.dispose(Instance.current))
}
},
})