mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-06 12:57:48 +00:00
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
11 lines
353 B
TypeScript
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();
|
|
});
|
|
});
|