test(skill-tool): restore bun mocks after tests

This commit is contained in:
YeonGyu-Kim
2026-02-14 22:06:46 +09:00
parent 2b4651e119
commit 2a7dfac50e

View File

@@ -1,4 +1,4 @@
import { describe, it, expect, beforeEach, mock, spyOn } from "bun:test"
import { afterAll, beforeEach, describe, expect, it, mock, spyOn } from "bun:test"
import type { ToolContext } from "@opencode-ai/plugin/tool"
import * as fs from "node:fs"
import { createSkillTool } from "./tools"
@@ -21,6 +21,10 @@ Test skill body content`
},
}))
afterAll(() => {
mock.restore()
})
function createMockSkill(name: string, options: { agent?: string } = {}): LoadedSkill {
return {
name,