astro/packages/astro/e2e/solid-circular.test.js
2023-05-19 22:46:31 +08:00

23 lines
591 B
JavaScript

import { expect } from '@playwright/test';
import { testFactory } from './test-utils.js';
const test = testFactory({ root: './fixtures/solid-circular/' });
let devServer;
test.beforeAll(async ({ astro }) => {
devServer = await astro.startDevServer();
});
test.afterAll(async () => {
await devServer.stop();
});
test.describe('Circular imports with Solid', () => {
test('Context', async ({ astro, page }) => {
await page.goto(astro.resolveUrl('/'));
const wrapper = page.locator('#context');
await expect(wrapper, 'context should not be duplicated').toHaveText('fr');
});
});