Adds browser tests and fixes hydration of the 404 page
The prerendered 404 page is served for other URLs, so its dehydrated match id differs and the router renders the catch-all's pending component first. Without one that render was empty, which gave React error 418 and duplicate head tags. The tests run the built output in a real browser under the production CSP. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
// Browsertests (BR-TST-05, BR-TST-06) tegen de gebouwde site in dist/client.
|
||||
// Los van vite.config.ts: de Start-plugin en de jsdom-opzet van de
|
||||
// unittests horen hier niet bij. Geen dekking, de tests meten de build.
|
||||
export default defineConfig({
|
||||
// De tests lezen het register en de content uit src (zelfde bron als de site)
|
||||
resolve: { tsconfigPaths: true },
|
||||
test: {
|
||||
environment: 'node',
|
||||
include: ['e2e/**/*.e2e.ts'],
|
||||
// De CI-runner (Raspberry Pi) is veel trager dan een pc: Chrome starten
|
||||
// en een pagina hydrateren kost daar vele seconden
|
||||
testTimeout: 60_000,
|
||||
hookTimeout: 60_000,
|
||||
// Bouwt niets; controleert alleen dat dist/client er is
|
||||
globalSetup: ['./e2e/support/globalSetup.ts'],
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user