diff --git a/web/CLAUDE.md b/web/CLAUDE.md index 3fdf2dd7..6bde53ce 100644 --- a/web/CLAUDE.md +++ b/web/CLAUDE.md @@ -283,6 +283,12 @@ it.for([ ### Mocks & path coverage +- **Every exported function is covered by unit tests** — a module's + exports are its testable contract, and none of them ships untested. + Modules with no exports whose evaluation wires things up (entry + points like `electron/main.ts` and `electron/preload.ts`) are tested + through their module side effects: mock the boundaries, import the + module, assert the wiring. - **Every path gets a test** — the success path and each failure path, including one per collaborator that can fail, especially in unit tests. A `describe` per method groups them; the linear `it`s are the rows, diff --git a/web/vitest.config.ts b/web/vitest.config.ts index 0d21e421..b76fa781 100644 --- a/web/vitest.config.ts +++ b/web/vitest.config.ts @@ -97,6 +97,11 @@ export default defineConfig({ ...sharedTestOptions, name: "nuxt", environment: "nuxt", + // @nuxt/test-utils boots the whole nuxt runtime in a + // beforeAll hook before the first .nuxt.test.ts file; on + // cold CI runners that routinely exceeds the 10s default + // and fails the suite before any test runs + hookTimeout: 60_000, include: ["app/**/*.nuxt.test.ts"], environmentOptions: { nuxt: {