docs: web comments say what the app does, not how it came to be (#6277)
Rewrites the web app's comments to rule 32. Task, milestone, rule and spec ids are gone; regression stories are restated as the trap they guard (public auth routes, the menu's stopPropagation, universal loads under adapter-static, metric deltas with their margin). Flutter and Tauri mentions now name the Android app or a native shell, operator quotes and dates are dropped, and one library's counts no longer appear outside test fixtures. Verified with a TypeScript-scanner token comparison (template literals and regex literals re-scanned): only comment text changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-11
@@ -15,17 +15,16 @@ vi.mock('@tanstack/svelte-query', async (orig) => {
|
||||
return { ...actual, useQueryClient: () => ({ invalidateQueries: vi.fn() }) };
|
||||
});
|
||||
|
||||
// Default SvelteKit app-module mocks for the whole suite (#3943). Without
|
||||
// them, any page or component that reaches $app/navigation or $app/state —
|
||||
// the home page does, through AlbumCard → AlbumMenu — loads SvelteKit's
|
||||
// client runtime, whose $app/paths reads __SVELTEKIT_PAYLOAD__ at module
|
||||
// load. That global only exists when the kit plugin's define reaches the
|
||||
// module, which it does not reliably under vitest: page.test.ts failed to
|
||||
// load on one CI run and passed on the re-run of the same commit (#374
|
||||
// was the same class). Stubbing the modules keeps every test off the
|
||||
// client bootstrap. Tests that assert on goto or need a particular URL
|
||||
// still mock per file (pageUrlModule in test-utils/mocks/appState.ts),
|
||||
// and per-file mocks win over these.
|
||||
// Default SvelteKit app-module mocks for the whole suite. Without them, any
|
||||
// page or component that reaches $app/navigation or $app/state — the home page
|
||||
// does, through AlbumCard → AlbumMenu — loads SvelteKit's client runtime, whose
|
||||
// $app/paths reads __SVELTEKIT_PAYLOAD__ at module load. That global only
|
||||
// exists when the kit plugin's define reaches the module, which it does not
|
||||
// reliably under vitest, so a page test can fail to load on one run and pass on
|
||||
// the next. Stubbing the modules keeps every test off the client bootstrap.
|
||||
// Tests that assert on goto or need a particular URL still mock per file
|
||||
// (pageUrlModule in test-utils/mocks/appState.ts), and per-file mocks win over
|
||||
// these.
|
||||
vi.mock('$app/navigation', () => ({
|
||||
goto: vi.fn(() => Promise.resolve()),
|
||||
invalidate: vi.fn(() => Promise.resolve()),
|
||||
|
||||
Reference in New Issue
Block a user