2025-03-04 07:05:22 +00:00
|
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
import { describe, it, expect } from 'vitest';
|
|
|
|
import { setup, $fetch } from '@nuxt/test-utils/e2e';
|
2024-06-11 12:21:12 +00:00
|
|
|
|
|
|
|
describe('ssr', async () => {
|
2025-03-04 07:05:22 +00:00
|
|
|
await setup({
|
|
|
|
rootDir: fileURLToPath(new URL('./fixtures/basic', import.meta.url))
|
|
|
|
});
|
2024-06-11 12:21:12 +00:00
|
|
|
|
2025-03-04 07:05:22 +00:00
|
|
|
it('renders the index page', async () => {
|
|
|
|
// Get response to a server-rendered page with `$fetch`.
|
|
|
|
const html = await $fetch('/');
|
|
|
|
expect(html).toContain('<div>basic</div>');
|
|
|
|
});
|
|
|
|
});
|