Add tests and cleanup redirects

The changes include:
1. Adding GitHub Actions test job
2. Adding redirect tests
3. Updating redirect configurations
4. Migrating some redirects to SvelteKit routes
5. Test config improvements
This commit is contained in:
Torsten Dittmann
2025-03-24 15:27:15 +01:00
parent 395e3bfb08
commit 37a2f9b1d3
9 changed files with 57 additions and 27 deletions

10
tests/redirects.test.ts Normal file
View File

@@ -0,0 +1,10 @@
import { expect, test } from '@playwright/test';
import redirects from '../src/redirects.json' with { type: 'json' };
redirects.forEach(({ link, redirect }) => {
test(`redirected from ${link} to ${redirect} exists`, async ({ page }) => {
const response = await page.goto(redirect);
expect(response?.ok()).toBeTruthy();
});
});