Compares the preview server with real nginx in tests
The preview server must behave like the real server, or Lighthouse and the browser tests prove the wrong thing. The tests also cover the new URLs in a real browser: one redirect, one title, a clean hydration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,8 @@ afterAll(() => server.close());
|
||||
|
||||
async function fetchDocument(path: string) {
|
||||
const response = await fetch(server.origin + path);
|
||||
expect(response.status).toBe(200);
|
||||
// /404.html is een echte 404 (BR-HST-05)
|
||||
expect(response.status).toBe(path === '/404.html' ? 404 : 200);
|
||||
const html = await response.text();
|
||||
return {
|
||||
html,
|
||||
|
||||
Reference in New Issue
Block a user