fix: revert delegate-task to string category schema, fix mock isolation and restore UB7 originals

This commit is contained in:
YeonGyu-Kim
2026-03-31 17:25:00 -07:00
parent 92d70cff5b
commit ce0d3581f0
9 changed files with 74 additions and 187 deletions
-24
View File
@@ -1,5 +1,3 @@
/// <reference path="../../bun-test.d.ts" />
import { afterEach, beforeEach, describe, expect, it } from "bun:test"
import { mkdirSync, rmSync, writeFileSync } from "node:fs"
import { tmpdir } from "node:os"
@@ -82,26 +80,4 @@ describe("checkForLegacyPluginEntry", () => {
expect(result.legacyEntries).toEqual([])
expect(result.configPath).toBeNull()
})
describe("#given a project-local .opencode config contains a legacy plugin entry", () => {
it("#then detects the project-local config path", () => {
// given
const projectDir = join(testConfigDir, "project")
const projectConfigDir = join(projectDir, ".opencode")
mkdirSync(projectConfigDir, { recursive: true })
writeFileSync(
join(projectConfigDir, "opencode.json"),
JSON.stringify({ plugin: ["oh-my-opencode"] }, null, 2),
)
// when
const result = checkForLegacyPluginEntry(undefined, projectDir)
// then
expect(result.hasLegacyEntry).toBe(true)
expect(result.hasCanonicalEntry).toBe(false)
expect(result.legacyEntries).toEqual(["oh-my-opencode"])
expect(result.configPath).toBe(join(projectConfigDir, "opencode.json"))
})
})
})