diff --git a/packages/opencode/test/lib/run-process.ts b/packages/opencode/test/lib/run-process.ts index 0ac078349d..7592895c75 100644 --- a/packages/opencode/test/lib/run-process.ts +++ b/packages/opencode/test/lib/run-process.ts @@ -114,10 +114,7 @@ export function withRunFixture( const configJson = JSON.stringify(testProviderConfig(llm.url)) const env = isolatedEnv(home, configJson) - const spawn = ( - args: string[], - opts?: SpawnOpts, - ): Effect.Effect => + const spawn = (args: string[], opts?: SpawnOpts): Effect.Effect => Effect.promise(async () => { const start = Date.now() // Process.run pipes stdout/stderr by default and returns them as Buffers. @@ -167,9 +164,7 @@ function expectExit(result: RunResult, expected: number, label = "opencode") { if (result.exitCode === expected) return const tail = (s: string, n: number) => (s.length > n ? "..." + s.slice(-n) : s) // eslint-disable-next-line no-console - console.error( - `[${label}] expected exit ${expected}, got ${result.exitCode} after ${result.durationMs}ms`, - ) + console.error(`[${label}] expected exit ${expected}, got ${result.exitCode} after ${result.durationMs}ms`) // eslint-disable-next-line no-console console.error(`[${label}] stderr (last 2000):\n${tail(result.stderr, 2000)}`) // eslint-disable-next-line no-console @@ -185,9 +180,6 @@ function expectExit(result: RunResult, expected: number, label = "opencode") { // clock — a TestClock-paused environment can't drive a child process. If you // need `.only` or `.skip`, fall back to `it.live` + `withRunFixture` directly. export const runIt = { - live: ( - name: string, - body: (input: RunFixture) => Effect.Effect, - opts?: number | TestOptions, - ) => it.live(name, () => withRunFixture(body), opts), + live: (name: string, body: (input: RunFixture) => Effect.Effect, opts?: number | TestOptions) => + it.live(name, () => withRunFixture(body), opts), }