98f242cdcd
* fix(#4332): add helpful error on cyclic references * chore: add changeset * test(e2e): add cyclic reference test * test(e2e): add preact integration * chore: update lockfile * fix: ensure vite client is loaded for 500 responses Co-authored-by: Nate Moore <nate@astro.build>
24 lines
623 B
JavaScript
24 lines
623 B
JavaScript
import { expect } from '@playwright/test';
|
|
import { testFactory, getErrorOverlayMessage } from './test-utils.js';
|
|
|
|
const test = testFactory({ root: './fixtures/error-cyclic/' });
|
|
|
|
let devServer;
|
|
|
|
test.beforeEach(async ({ astro }) => {
|
|
devServer = await astro.startDevServer();
|
|
});
|
|
|
|
test.afterEach(async ({ astro }) => {
|
|
await devServer.stop();
|
|
astro.resetAllFiles();
|
|
});
|
|
|
|
test.describe('Error: Cyclic Reference', () => {
|
|
test('overlay', async ({ page, astro }) => {
|
|
await page.goto(astro.resolveUrl('/'));
|
|
|
|
const message = await getErrorOverlayMessage(page);
|
|
expect(message).toMatch('Cyclic reference');
|
|
});
|
|
});
|