Its a crux!
1import { fileURLToPath } from 'node:url'
2import { describe, it, expect } from 'vitest'
3import { setup, $fetch } from '@nuxt/test-utils/e2e'
4
5describe('ssr', async () => {
6 await setup({
7 rootDir: fileURLToPath(new URL('./fixtures/basic', import.meta.url)),
8 })
9
10 it('renders the index page', async () => {
11 // Get response to a server-rendered page with `$fetch`.
12 const html = await $fetch('/')
13 expect(html).toContain('<div>basic</div>')
14 })
15})