basic.test.ts 459 B

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