mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
1a7b570c82
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
21 lines
532 B
TypeScript
21 lines
532 B
TypeScript
import { fileURLToPath } from 'url'
|
|
import { describe, expect, it } from 'vitest'
|
|
import { setup, $fetch, isDev } from '@nuxt/test-utils'
|
|
|
|
describe('example', async () => {
|
|
await setup({
|
|
rootDir: fileURLToPath(new URL('..', import.meta.url)),
|
|
server: true
|
|
})
|
|
|
|
it('Renders Hello Nuxt', async () => {
|
|
expect(await $fetch('/')).toMatch('Hello Nuxt!')
|
|
})
|
|
|
|
if (isDev()) {
|
|
it('[dev] ensure vite client script is added', async () => {
|
|
expect(await $fetch('/')).toMatch('/_nuxt/@vite/client"')
|
|
})
|
|
}
|
|
})
|