mirror of
https://github.com/bitbaum/petvity.git
synced 2026-12-05 09:08:01 +01:00
/portal/settings is a client component that read the session with useSession() and returned null for the entire page until it arrived. Server rendering therefore produced an empty page: a person clicking Settings saw nothing at all, with no title, no explanation, and no sign anything was loading. It is the only portal page that did this — the others resolve the session on the server. The header is static, so it now renders immediately and only the account cards wait, as two skeleton cards marked aria-busy. A status code cannot see this failure — the page answered 200 the whole time — so the walkthrough gains a section that asserts the header vocabulary is actually present in the HTML of eleven portal pages, not merely that they respond. Also fixes the test suite double-counting itself. `next build` copies the whole project into .next/standalone/, test files included, and vitest's default excludes do not cover .next — so running the suite after a build collected every test twice and the totals depended on whether you had built first. That is where the "1220 tests / 137 files" figure in the last two PR descriptions came from; the real suite is 614 tests across 69 files, and it was passing under both readings. CI runs verify before build on a fresh checkout, so it always saw the true number. Verified: lint clean · tsc --noEmit exit 0 · 614/614 tests across 69 files.
20 lines
670 B
TypeScript
20 lines
670 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
import path from "path";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
environment: "node",
|
|
// `next build` copies the whole project into .next/standalone/, test files
|
|
// included, and vitest's default excludes do not cover .next — so running
|
|
// the suite after a build collected the same tests twice and the count
|
|
// depended on whether you had built first. Extending `exclude` replaces
|
|
// the defaults, so node_modules and dist are restated here.
|
|
exclude: ["**/node_modules/**", "**/dist/**", "**/.next/**"],
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "."),
|
|
},
|
|
},
|
|
});
|