chore: generate
This commit is contained in:
parent
38d2276592
commit
0a125e5d4d
4 changed files with 12 additions and 14 deletions
|
|
@ -85,8 +85,14 @@ export async function startBackend(label: string): Promise<Handle> {
|
||||||
stdio: ["ignore", "pipe", "pipe"],
|
stdio: ["ignore", "pipe", "pipe"],
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
proc.stdout?.on("data", (chunk) => { out.push(String(chunk)); cap(out) })
|
proc.stdout?.on("data", (chunk) => {
|
||||||
proc.stderr?.on("data", (chunk) => { err.push(String(chunk)); cap(err) })
|
out.push(String(chunk))
|
||||||
|
cap(out)
|
||||||
|
})
|
||||||
|
proc.stderr?.on("data", (chunk) => {
|
||||||
|
err.push(String(chunk))
|
||||||
|
cap(err)
|
||||||
|
})
|
||||||
|
|
||||||
const url = `http://127.0.0.1:${port}`
|
const url = `http://127.0.0.1:${port}`
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -186,9 +186,7 @@ export const test = base.extend<TestFixtures, WorkerFixtures>({
|
||||||
await use(gotoSession)
|
await use(gotoSession)
|
||||||
},
|
},
|
||||||
withProject: async ({ page }, use) => {
|
withProject: async ({ page }, use) => {
|
||||||
await use((callback, options) =>
|
await use((callback, options) => runProject(page, callback, options))
|
||||||
runProject(page, callback, options),
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
withBackendProject: async ({ page, backend }, use) => {
|
withBackendProject: async ({ page, backend }, use) => {
|
||||||
await use((callback, options) =>
|
await use((callback, options) =>
|
||||||
|
|
@ -241,9 +239,7 @@ async function runProject<T>(
|
||||||
} finally {
|
} finally {
|
||||||
setHealthPhase(page, "cleanup")
|
setHealthPhase(page, "cleanup")
|
||||||
await Promise.allSettled(
|
await Promise.allSettled(
|
||||||
Array.from(sessions, ([sessionID, directory]) =>
|
Array.from(sessions, ([sessionID, directory]) => cleanupSession({ sessionID, directory, serverUrl: url })),
|
||||||
cleanupSession({ sessionID, directory, serverUrl: url }),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
await Promise.allSettled(Array.from(dirs, (directory) => cleanupTestProject(directory)))
|
await Promise.allSettled(Array.from(dirs, (directory) => cleanupTestProject(directory)))
|
||||||
await cleanupTestProject(root)
|
await cleanupTestProject(root)
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,7 @@ test("prompt succeeds when sync message endpoint is unreachable", async ({
|
||||||
|
|
||||||
await expect.poll(() => llm.calls()).toBeGreaterThanOrEqual(1)
|
await expect.poll(() => llm.calls()).toBeGreaterThanOrEqual(1)
|
||||||
|
|
||||||
await expect
|
await expect.poll(() => assistantText(project.sdk, sessionID), { timeout: 90_000 }).toContain(token)
|
||||||
.poll(() => assistantText(project.sdk, sessionID), { timeout: 90_000 })
|
|
||||||
.toContain(token)
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
model: openaiModel,
|
model: openaiModel,
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,7 @@ test("can send a prompt and receive a reply", async ({ page, llm, backend, withB
|
||||||
|
|
||||||
await expect.poll(() => llm.calls()).toBeGreaterThanOrEqual(1)
|
await expect.poll(() => llm.calls()).toBeGreaterThanOrEqual(1)
|
||||||
|
|
||||||
await expect
|
await expect.poll(() => assistantText(project.sdk, sessionID), { timeout: 30_000 }).toContain(token)
|
||||||
.poll(() => assistantText(project.sdk, sessionID), { timeout: 30_000 })
|
|
||||||
.toContain(token)
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
model: openaiModel,
|
model: openaiModel,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue