fix: revert delegate-task to string category schema, fix mock isolation and restore UB7 originals
This commit is contained in:
@@ -3,7 +3,7 @@ const { describe, expect, test } = require("bun:test")
|
||||
import { createDelegateTask } from "./tools"
|
||||
|
||||
describe("createDelegateTask schema", () => {
|
||||
test("#given category arg #when tool is created #then category is constrained to available enum values", () => {
|
||||
test("#given category arg #when tool is created #then category accepts any string", () => {
|
||||
//#given
|
||||
const toolDefinition = createDelegateTask({ manager: {} as never, client: {} as never, directory: "/tmp/test" })
|
||||
|
||||
@@ -13,16 +13,12 @@ import { createDelegateTask } from "./tools"
|
||||
type: string
|
||||
innerType: {
|
||||
def: { type: string }
|
||||
options: string[]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//#then
|
||||
expect(categorySchema.def.type).toBe("optional")
|
||||
expect(categorySchema.def.innerType.def.type).toBe("enum")
|
||||
expect(categorySchema.def.innerType.options).toContain("quick")
|
||||
expect(categorySchema.def.innerType.options).toContain("deep")
|
||||
expect(categorySchema.def.innerType.options).toContain("ultrabrain")
|
||||
expect(categorySchema.def.innerType.def.type).toBe("string")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user