test: tighten session proxy assertions

This commit is contained in:
Peter Steinberger
2026-05-08 14:25:43 +01:00
parent fa15090ead
commit 067ceb38b7
3 changed files with 6 additions and 5 deletions

View File

@@ -464,6 +464,7 @@ describe("proxy cli runtime", () => {
const { runDebugProxyRunCommand } = await import("./proxy-cli.runtime.js");
const { getDebugProxyCaptureStore } = await import("../proxy-capture/store.sqlite.js");
const beforeRun = Date.now();
await expect(
runDebugProxyRunCommand({
commandArgs: ["does-not-exist"],
@@ -478,6 +479,6 @@ describe("proxy cli runtime", () => {
);
const [session] = store.listSessions(5);
expect(session?.mode).toBe("proxy-run");
expect(session?.endedAt).toEqual(expect.any(Number));
expect(session?.endedAt).toBeGreaterThanOrEqual(beforeRun);
});
});