fix: stabilize pty send-keys tests

This commit is contained in:
Peter Steinberger
2026-01-17 06:32:24 +00:00
parent 5ebfc0738f
commit a4178e4062
3 changed files with 11 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ describe("session slug", () => {
it("falls back to three words when collisions persist", () => {
vi.spyOn(Math, "random").mockReturnValue(0);
const slug = createSessionSlug((id) => id === "amber-atlas" || id === "amber-atlas-2");
const slug = createSessionSlug((id) => /^amber-atlas(-\d+)?$/.test(id));
expect(slug).toBe("amber-atlas-atlas");
});
});