Skip to content

Commit 4214ae2

Browse files
chore: generate
1 parent d9d4f89 commit 4214ae2

2 files changed

Lines changed: 10 additions & 13 deletions

File tree

packages/app/e2e/session/session-review.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ async function patchWithMock(
6464
// Wait for the agent loop to actually start before checking idle.
6565
// promptAsync is fire-and-forget — without this, waitSessionIdle can
6666
// return immediately because the session status is still undefined.
67-
await expect
68-
.poll(() => llm.calls().then((c) => c > callsBefore), { timeout: 30_000 })
69-
.toBe(true)
67+
await expect.poll(() => llm.calls().then((c) => c > callsBefore), { timeout: 30_000 }).toBe(true)
7068

7169
await waitSessionIdle(sdk, sessionID, 120_000)
7270
}

packages/opencode/test/session/snapshot-tool-race.test.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,11 @@ it.live("tool execution produces non-empty session diff (snapshot race)", () =>
183183

184184
// Use bash tool (always registered) to create a file
185185
const command = `echo 'snapshot race test content' > ${path.join(dir, "race-test.txt")}`
186-
yield* llm.toolMatch(
187-
(hit) => JSON.stringify(hit.body).includes("create the file"),
188-
"bash",
189-
{ command, description: "create test file" },
190-
)
191-
yield* llm.textMatch(
192-
(hit) => JSON.stringify(hit.body).includes("bash"),
193-
"done",
194-
)
186+
yield* llm.toolMatch((hit) => JSON.stringify(hit.body).includes("create the file"), "bash", {
187+
command,
188+
description: "create test file",
189+
})
190+
yield* llm.textMatch((hit) => JSON.stringify(hit.body).includes("bash"), "done")
195191

196192
// Seed user message
197193
yield* prompt.prompt({
@@ -208,7 +204,10 @@ it.live("tool execution produces non-empty session diff (snapshot race)", () =>
208204
// Verify the file was created
209205
const filePath = path.join(dir, "race-test.txt")
210206
const fileExists = yield* Effect.promise(() =>
211-
fs.access(filePath).then(() => true).catch(() => false),
207+
fs
208+
.access(filePath)
209+
.then(() => true)
210+
.catch(() => false),
212211
)
213212
expect(fileExists).toBe(true)
214213

0 commit comments

Comments
 (0)