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, 03:37 UTC
| 1 | import { beforeEach } from "vite-plus/test"; |
| 2 | import { commands } from "vite-plus/test/browser"; |
| 3 | |
| 4 | import { initializeI18n } from "../src/i18n/initializeI18n"; |
| 5 | |
| 6 | declare module "vite-plus/test/browser" { |
| 7 | interface BrowserCommands { |
| 8 | /** Defined in vite.config.ts. Moves Playwright's mouse off the page. */ |
| 9 | resetPointer: () => Promise<void>; |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | // Playwright's mouse outlives each test and each file, so whatever the next test mounts |
| 14 | // under its last position starts hovered. Registered here rather than in render() so tests |
| 15 | // that mount without it are covered too. Before each test, not after: a timed-out test keeps |
| 16 | // running and can move the mouse after its own afterEach. |
| 17 | beforeEach(async () => { |
| 18 | await commands.resetPointer(); |
| 19 | }); |
| 20 | |
| 21 | // The app initializes GT at startup; components using its hooks need the same here. |
| 22 | initializeI18n(() => {}); |