mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
c53c7360b7
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
20 lines
554 B
TypeScript
20 lines
554 B
TypeScript
import { fileURLToPath } from 'url'
|
|
import { resolve } from 'path'
|
|
import { describe, expect, it } from 'vitest'
|
|
// TODO: Should import from @nuxt/test-utils
|
|
import { setup, $fetch } from '../../packages/test-utils/src'
|
|
|
|
const examplesDir = fileURLToPath(new URL('../../examples', import.meta.url))
|
|
|
|
await setup({
|
|
rootDir: resolve(examplesDir, 'hello-world'),
|
|
runner: 'vitest',
|
|
server: true
|
|
})
|
|
|
|
describe('examples:hello-world', () => {
|
|
it('Render hello world test', async () => {
|
|
expect(await $fetch('/')).to.contain('Hello Nuxt 3!')
|
|
})
|
|
})
|