test(tools): update MCP, delegate-task, skill, and slashcommand tests

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-10 15:53:35 +09:00
parent ca9b5fde40
commit 37057f18b9
12 changed files with 312 additions and 112 deletions
+12 -2
View File
@@ -1,6 +1,16 @@
declare const require: (name: string) => any
const { describe, expect, test } = require("bun:test")
import { createDelegateTask } from "./tools"
function requireFresh<T>(modulePath: string): T {
const resolvedPath = require.resolve(modulePath)
if (require.cache?.[resolvedPath]) {
delete require.cache[resolvedPath]
}
return require(modulePath) as T
}
function createDelegateTask(...args: Parameters<typeof import("./tools").createDelegateTask>): ReturnType<typeof import("./tools").createDelegateTask> {
return requireFresh<typeof import("./tools")>("./tools").createDelegateTask(...args)
}
describe("createDelegateTask schema", () => {
test("#given category arg #when tool is created #then category accepts any string", () => {