Aiden Cline 3 săptămâni în urmă
părinte
comite
e2d0d85d93
1 a modificat fișierele cu 40 adăugiri și 40 ștergeri
  1. 40 40
      packages/opencode/test/tool/question.test.ts

+ 40 - 40
packages/opencode/test/tool/question.test.ts

@@ -63,44 +63,44 @@ describe("tool.question", () => {
     expect(result.output).toContain(`"What is your favorite animal?"="Dog"`)
   })
 
-// intentionally removed the zod validation due to tool call errors, hoping prompting is gonna be good enough
-//   test("should throw an Error for header exceeding 30 characters", async () => {
-//     const tool = await QuestionTool.init()
-//     const questions = [
-//       {
-//         question: "What is your favorite animal?",
-//         header: "This Header is Definitely More Than Thirty Characters Long",
-//         options: [{ label: "Dog", description: "Man's best friend" }],
-//       },
-//     ]
-//     try {
-//       await tool.execute({ questions }, ctx)
-//       // If it reaches here, the test should fail
-//       expect(true).toBe(false)
-//     } catch (e: any) {
-//       expect(e).toBeInstanceOf(Error)
-//       expect(e.cause).toBeInstanceOf(z.ZodError)
-//     }
-//   })
+  // intentionally removed the zod validation due to tool call errors, hoping prompting is gonna be good enough
+  //   test("should throw an Error for header exceeding 30 characters", async () => {
+  //     const tool = await QuestionTool.init()
+  //     const questions = [
+  //       {
+  //         question: "What is your favorite animal?",
+  //         header: "This Header is Definitely More Than Thirty Characters Long",
+  //         options: [{ label: "Dog", description: "Man's best friend" }],
+  //       },
+  //     ]
+  //     try {
+  //       await tool.execute({ questions }, ctx)
+  //       // If it reaches here, the test should fail
+  //       expect(true).toBe(false)
+  //     } catch (e: any) {
+  //       expect(e).toBeInstanceOf(Error)
+  //       expect(e.cause).toBeInstanceOf(z.ZodError)
+  //     }
+  //   })
 
-//   test("should throw an Error for label exceeding 30 characters", async () => {
-//     const tool = await QuestionTool.init()
-//     const questions = [
-//       {
-//         question: "A question with a very long label",
-//         header: "Long Label",
-//         options: [
-//           { label: "This is a very, very, very long label that will exceed the limit", description: "A description" },
-//         ],
-//       },
-//     ]
-//     try {
-//       await tool.execute({ questions }, ctx)
-//       // If it reaches here, the test should fail
-//       expect(true).toBe(false)
-//     } catch (e: any) {
-//       expect(e).toBeInstanceOf(Error)
-//       expect(e.cause).toBeInstanceOf(z.ZodError)
-//     }
-//   })
-// })
+  //   test("should throw an Error for label exceeding 30 characters", async () => {
+  //     const tool = await QuestionTool.init()
+  //     const questions = [
+  //       {
+  //         question: "A question with a very long label",
+  //         header: "Long Label",
+  //         options: [
+  //           { label: "This is a very, very, very long label that will exceed the limit", description: "A description" },
+  //         ],
+  //       },
+  //     ]
+  //     try {
+  //       await tool.execute({ questions }, ctx)
+  //       // If it reaches here, the test should fail
+  //       expect(true).toBe(false)
+  //     } catch (e: any) {
+  //       expect(e).toBeInstanceOf(Error)
+  //       expect(e.cause).toBeInstanceOf(z.ZodError)
+  //     }
+  //   })
+})