Files
website/tests/redirects.test.ts
Torsten Dittmann 37a2f9b1d3 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
2025-03-24 15:27:15 +01:00

11 lines
353 B
TypeScript

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();
});
});