mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
27 lines
760 B
TypeScript
27 lines
760 B
TypeScript
import { fileURLToPath } from 'url'
|
|
import { describe, expect, it } from 'vitest'
|
|
import { setup, $fetch } from '@nuxt/test-utils'
|
|
|
|
describe('fixtures:bridge', async () => {
|
|
await setup({
|
|
rootDir: fileURLToPath(new URL('./fixtures/bridge', import.meta.url)),
|
|
server: true
|
|
})
|
|
|
|
describe('pages', () => {
|
|
it('render hello world', async () => {
|
|
expect(await $fetch('/')).to.contain('Hello Vue 2!')
|
|
})
|
|
it('uses server Vue build', async () => {
|
|
expect(await $fetch('/')).to.contain('Rendered on server: true')
|
|
})
|
|
})
|
|
|
|
describe('navigate', () => {
|
|
it('should redirect to index with navigateTo', async () => {
|
|
const html = await $fetch('/navigate-to/')
|
|
expect(html).toContain('Hello Vue 2!')
|
|
})
|
|
})
|
|
})
|