The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import { describe, expect, it } from "vite-plus/test"; |
| 2 | |
| 3 | import { beginForegroundHandoff, isForegroundHandoffActive } from "./foreground-handoff"; |
| 4 | |
| 5 | describe("foreground handoff", () => { |
| 6 | it("tolerates an end function called twice", () => { |
| 7 | const endFirst = beginForegroundHandoff(); |
| 8 | const endSecond = beginForegroundHandoff(); |
| 9 | endFirst(); |
| 10 | endFirst(); |
| 11 | expect(isForegroundHandoffActive()).toBe(true); |
| 12 | endSecond(); |
| 13 | expect(isForegroundHandoffActive()).toBe(false); |
| 14 | }); |
| 15 | }); |