opencode-agent[bot] преди 4 дни
родител
ревизия
fc5c781085
променени са 3 файла, в които са добавени 14 реда и са изтрити 9 реда
  1. 1 3
      packages/core/test/session-execution.test.ts
  2. 7 5
      packages/core/test/session-runner.test.ts
  3. 6 1
      packages/tui/test/cli/tui/dialog-select.test.tsx

+ 1 - 3
packages/core/test/session-execution.test.ts

@@ -346,9 +346,7 @@ function attempts(database: Database.Service["Service"], sessionID: Session.ID)
 /** Builds the local execution layer plus the restart actions against the test harness services. */
 /** Builds the local execution layer plus the restart actions against the test harness services. */
 function buildExecution(
 function buildExecution(
   scope: Scope.Closeable,
   scope: Scope.Closeable,
-  drain: (
-    input: Parameters<SessionRunner.Interface["drain"]>[0],
-  ) => Effect.Effect<void, SessionRunner.RunError>,
+  drain: (input: Parameters<SessionRunner.Interface["drain"]>[0]) => Effect.Effect<void, SessionRunner.RunError>,
   options?: SessionRestart.Options,
   options?: SessionRestart.Options,
 ) {
 ) {
   return Effect.gen(function* () {
   return Effect.gen(function* () {

+ 7 - 5
packages/core/test/session-runner.test.ts

@@ -392,11 +392,13 @@ const execution = Layer.effect(
       force: boolean,
       force: boolean,
       continuation?: SessionRunner.Continuation,
       continuation?: SessionRunner.Continuation,
     ): Effect.Effect<void, SessionRunner.RunError> {
     ): Effect.Effect<void, SessionRunner.RunError> {
-      return sessionRunner.drain({ sessionID, force, continuation }).pipe(
-        Effect.flatMap((result) =>
-          result.type === "complete" ? Effect.void : drain(sessionID, false, result.continuation),
-        ),
-      )
+      return sessionRunner
+        .drain({ sessionID, force, continuation })
+        .pipe(
+          Effect.flatMap((result) =>
+            result.type === "complete" ? Effect.void : drain(sessionID, false, result.continuation),
+          ),
+        )
     }
     }
     const coordinator = yield* SessionRunCoordinator.make<Session.ID, SessionRunner.RunError>({
     const coordinator = yield* SessionRunCoordinator.make<Session.ID, SessionRunner.RunError>({
       drain: (sessionID, force) => drain(sessionID, force),
       drain: (sessionID, force) => drain(sessionID, force),

+ 6 - 1
packages/tui/test/cli/tui/dialog-select.test.tsx

@@ -216,7 +216,12 @@ test("passes the row foreground color to gutters", async () => {
     expect(selected).not.toEqual(idle)
     expect(selected).not.toEqual(idle)
 
 
     select.app.mockInput.pressArrow("down")
     select.app.mockInput.pressArrow("down")
-    await select.app.waitFor(() => colors.get("alpha")!.toInts().every((value, index) => value === idle[index]))
+    await select.app.waitFor(() =>
+      colors
+        .get("alpha")!
+        .toInts()
+        .every((value, index) => value === idle[index]),
+    )
     expect(colors.get("beta")!.toInts()).toEqual(selected)
     expect(colors.get("beta")!.toInts()).toEqual(selected)
   } finally {
   } finally {
     select.app.renderer.destroy()
     select.app.renderer.destroy()