Scaffolding for Nuxt module
This commit is contained in:
commit
51db5e8b53
19 changed files with 16655 additions and 0 deletions
15
test/basic.test.ts
Normal file
15
test/basic.test.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { describe, it, expect } from 'vitest'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { setup, $fetch } from '@nuxt/test-utils'
|
||||
|
||||
describe('ssr', async () => {
|
||||
await setup({
|
||||
rootDir: fileURLToPath(new URL('./fixtures/basic', import.meta.url)),
|
||||
})
|
||||
|
||||
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>')
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue