astro/packages/astro/e2e/error-cyclic.test.js
Nate Moore 8fb28648f6
Unflag experimental features (#5728)
* feat: unflag `--experimental-error-overlay`

* feat: unflag `--experimental-prerender`

* chore: add changeset

* Update chilled-geese-worry.md

* test: update test to use `mjs`

* Update .changeset/chilled-geese-worry.md

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* Update chilled-geese-worry.md

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2023-01-03 14:05:46 -05:00

26 lines
635 B
JavaScript

import { expect } from '@playwright/test';
import { testFactory, getErrorOverlayContent } 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 getErrorOverlayContent(page)).message;
expect(message).toMatch('Cyclic reference');
});
});