chore: generate
This commit is contained in:
@@ -48,7 +48,12 @@ benchmark("hydrates an orphaned latest turn after a cold session click", async (
|
|||||||
const results = [] as Awaited<ReturnType<typeof trial>>[]
|
const results = [] as Awaited<ReturnType<typeof trial>>[]
|
||||||
for (let run = 0; run < 5; run++) {
|
for (let run = 0; run < 5; run++) {
|
||||||
results.push(
|
results.push(
|
||||||
await withBenchmarkPage(browser, `session-parent-hydration-${mode}-${run}`, (page) => trial(page, mode), testInfo),
|
await withBenchmarkPage(
|
||||||
|
browser,
|
||||||
|
`session-parent-hydration-${mode}-${run}`,
|
||||||
|
(page) => trial(page, mode),
|
||||||
|
testInfo,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
const timing = results.map((result) => result.metrics.firstCorrectObservedMs!).sort((a, b) => a - b)
|
const timing = results.map((result) => result.metrics.firstCorrectObservedMs!).sort((a, b) => a - b)
|
||||||
|
|||||||
@@ -30,7 +30,12 @@ test("stops sampling when the session switch fails", async () => {
|
|||||||
const failure = new Error("switch failed")
|
const failure = new Error("switch failed")
|
||||||
const context = testPage()
|
const context = testPage()
|
||||||
|
|
||||||
await expect(measureSessionSwitch(context.page, input(async () => Promise.reject(failure)))).rejects.toBe(failure)
|
await expect(
|
||||||
|
measureSessionSwitch(
|
||||||
|
context.page,
|
||||||
|
input(async () => Promise.reject(failure)),
|
||||||
|
),
|
||||||
|
).rejects.toBe(failure)
|
||||||
|
|
||||||
expect(context.stops).toHaveLength(1)
|
expect(context.stops).toHaveLength(1)
|
||||||
})
|
})
|
||||||
@@ -39,7 +44,12 @@ test("stops sampling when the stable wait fails", async () => {
|
|||||||
const failure = new Error("stable wait failed")
|
const failure = new Error("stable wait failed")
|
||||||
const context = testPage(failure)
|
const context = testPage(failure)
|
||||||
|
|
||||||
await expect(measureSessionSwitch(context.page, input(async () => {}))).rejects.toBe(failure)
|
await expect(
|
||||||
|
measureSessionSwitch(
|
||||||
|
context.page,
|
||||||
|
input(async () => {}),
|
||||||
|
),
|
||||||
|
).rejects.toBe(failure)
|
||||||
|
|
||||||
expect(context.stops).toHaveLength(1)
|
expect(context.stops).toHaveLength(1)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -194,9 +194,7 @@ describe("server session", () => {
|
|||||||
|
|
||||||
await store.sync("child")
|
await store.sync("child")
|
||||||
|
|
||||||
expect(client.requests).toEqual([
|
expect(client.requests).toEqual([{ sessionID: "child", limit: 2, before: undefined }])
|
||||||
{ sessionID: "child", limit: 2, before: undefined },
|
|
||||||
])
|
|
||||||
expect(client.rootRequests).toEqual([{ sessionID: "child", messageID: user.id }])
|
expect(client.rootRequests).toEqual([{ sessionID: "child", messageID: user.id }])
|
||||||
expect(store.data.message.child).toEqual([user, ...assistants])
|
expect(store.data.message.child).toEqual([user, ...assistants])
|
||||||
expect(store.history.more("child")).toBe(true)
|
expect(store.history.more("child")).toBe(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user