Replace Instance.disposeAll/load with fixture helper (#25418)
This commit is contained in:
@@ -6,10 +6,10 @@ import fs from "fs/promises"
|
||||
import { File } from "../../src/file"
|
||||
import { Instance } from "../../src/project/instance"
|
||||
import { Filesystem } from "@/util/filesystem"
|
||||
import { provideInstance, tmpdir } from "../fixture/fixture"
|
||||
import { disposeAllInstances, provideInstance, tmpdir } from "../fixture/fixture"
|
||||
|
||||
afterEach(async () => {
|
||||
await Instance.disposeAll()
|
||||
await disposeAllInstances()
|
||||
})
|
||||
|
||||
const init = () => run(File.Service.use((svc) => svc.init()))
|
||||
@@ -936,7 +936,7 @@ describe("file/index Filesystem patterns", () => {
|
||||
},
|
||||
})
|
||||
|
||||
await Instance.disposeAll()
|
||||
await disposeAllInstances()
|
||||
|
||||
await fs.writeFile(path.join(tmp.path, "after.ts"), "after", "utf-8")
|
||||
await fs.rm(path.join(tmp.path, "before.ts"))
|
||||
|
||||
@@ -3,7 +3,7 @@ import { afterEach, describe, expect, test } from "bun:test"
|
||||
import fs from "fs/promises"
|
||||
import path from "path"
|
||||
import { ConfigProvider, Deferred, Effect, Layer, ManagedRuntime, Option } from "effect"
|
||||
import { tmpdir } from "../fixture/fixture"
|
||||
import { disposeAllInstances, tmpdir } from "../fixture/fixture"
|
||||
import { Bus } from "../../src/bus"
|
||||
import { Config } from "@/config/config"
|
||||
import { FileWatcher } from "../../src/file/watcher"
|
||||
@@ -147,7 +147,7 @@ function ready(directory: string) {
|
||||
|
||||
describeWatcher("FileWatcher", () => {
|
||||
afterEach(async () => {
|
||||
await Instance.disposeAll()
|
||||
await disposeAllInstances()
|
||||
})
|
||||
|
||||
test("publishes root create, update, and delete events", async () => {
|
||||
|
||||
Reference in New Issue
Block a user