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
commit 4c4860fb24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 139 additions and 130 deletions

View file

@ -3,7 +3,7 @@ import { Effect } from "effect"
import fs from "fs/promises"
import path from "path"
import { pathToFileURL } from "url"
import { tmpdir } from "../fixture/fixture"
import { disposeAllInstances, tmpdir } from "../fixture/fixture"
import { Filesystem } from "@/util/filesystem"
const disableDefault = process.env.OPENCODE_DISABLE_DEFAULT_PLUGINS
@ -24,7 +24,7 @@ afterAll(() => {
})
afterEach(async () => {
await Instance.disposeAll()
await disposeAllInstances()
})
async function load(dir: string) {

View file

@ -3,7 +3,7 @@ import { Effect, Layer } from "effect"
import { CrossSpawnSpawner } from "@opencode-ai/core/cross-spawn-spawner"
import path from "path"
import { pathToFileURL } from "url"
import { provideTmpdirInstance } from "../fixture/fixture"
import { disposeAllInstances, provideTmpdirInstance } from "../fixture/fixture"
import { testEffect } from "../lib/effect"
const disableDefault = process.env.OPENCODE_DISABLE_DEFAULT_PLUGINS
@ -20,7 +20,7 @@ const experimental = Flag.OPENCODE_EXPERIMENTAL_WORKSPACES
Flag.OPENCODE_EXPERIMENTAL_WORKSPACES = true
afterEach(async () => {
await Instance.disposeAll()
await disposeAllInstances()
})
afterAll(() => {