Skip to content

Commit 3cbf74c

Browse files
committed
chore: add test
1 parent ea91f8b commit 3cbf74c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/basic.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { fileURLToPath } from 'node:url'
2+
import { describe, it, expect } from 'vitest'
3+
import { setup, $fetch } from '@nuxt/test-utils/e2e'
4+
5+
describe('ssr', async () => {
6+
await setup({
7+
rootDir: fileURLToPath(new URL('../playground', 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('<p>Click/tap me</p>')
14+
})
15+
})

0 commit comments

Comments
 (0)