Browse Source

chore: generate

opencode-agent[bot] 1 month ago
parent
commit
4ecc3ac653

+ 17 - 3
packages/opencode/test/cli/run/run-process.test.ts

@@ -130,7 +130,12 @@ describe("opencode run (non-interactive subprocess)", () => {
           { type: "step_finish", part: expect.objectContaining({ type: "step-finish" }) },
         ])
         expect(result.stdout.endsWith("\n")).toBe(true)
-        expect(result.stdout.split("\n").slice(0, -1).every((line) => line.length > 0)).toBe(true)
+        expect(
+          result.stdout
+            .split("\n")
+            .slice(0, -1)
+            .every((line) => line.length > 0),
+        ).toBe(true)
       }),
     60_000,
   )
@@ -191,9 +196,18 @@ describe("opencode run (non-interactive subprocess)", () => {
           expect.objectContaining({ type: "reasoning", text: "reasoning" }),
         )
         expect(events.find((event) => event.type === "tool_use")?.part).toEqual(
-          expect.objectContaining({ type: "tool", tool: "bash", state: expect.objectContaining({ status: "completed" }) }),
+          expect.objectContaining({
+            type: "tool",
+            tool: "bash",
+            state: expect.objectContaining({ status: "completed" }),
+          }),
         )
-        expect(result.stdout.split("\n").slice(0, -1).every((line) => line.startsWith("{"))).toBe(true)
+        expect(
+          result.stdout
+            .split("\n")
+            .slice(0, -1)
+            .every((line) => line.startsWith("{")),
+        ).toBe(true)
       }),
     60_000,
   )

+ 1 - 4
packages/opencode/test/lib/cli-process.ts

@@ -270,10 +270,7 @@ export function withCliFixture<A, E>(
     }
 
     const run = (message: string, opts?: RunOpts): Effect.Effect<RunResult> => {
-      return spawn(
-        runArgs(message, opts),
-        runOpts(opts),
-      )
+      return spawn(runArgs(message, opts), runOpts(opts))
     }
 
     const startRun = Effect.fn("opencode.startRun")(function* (message: string, opts?: RunOpts) {