mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 01:53:55 +00:00
18 lines
476 B
TypeScript
18 lines
476 B
TypeScript
import { fileURLToPath } from 'url'
|
|
import { resolve } from 'path'
|
|
import { describe, expect, it } from 'vitest'
|
|
import { setup, $fetch } from '@nuxt/test-utils'
|
|
|
|
const examplesDir = fileURLToPath(new URL('../../examples', import.meta.url))
|
|
|
|
await setup({
|
|
rootDir: resolve(examplesDir, 'hello-world'),
|
|
server: true
|
|
})
|
|
|
|
describe('examples:hello-world', () => {
|
|
it('Render hello world test', async () => {
|
|
expect(await $fetch('/')).to.contain('Hello Nuxt 3!')
|
|
})
|
|
})
|