fix(codemode): canonicalize dotted tool paths (#36994)
This commit is contained in:
parent
f5dd181443
commit
22334b94c8
7 changed files with 242 additions and 44 deletions
|
|
@ -56,11 +56,10 @@ describe("Object.keys over tool references", () => {
|
|||
expect(await value(`return typeof search`)).toBe("function")
|
||||
})
|
||||
|
||||
test("an unknown namespace is an UnknownTool error pointing at the discovery idioms", async () => {
|
||||
test("an unknown namespace is an UnknownTool error", async () => {
|
||||
const failure = await error(`return Object.keys(tools.nonexistent)`)
|
||||
expect(failure.kind).toBe("UnknownTool")
|
||||
expect(failure.message).toContain("Unknown tool namespace 'nonexistent'")
|
||||
expect(failure.suggestions?.join(" ")).toContain("Object.keys(tools)")
|
||||
})
|
||||
|
||||
test("Object.values/entries on a tool reference explain the working idioms", async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue