package list from viandwi24
This commit is contained in:
20
tests/example.test.ts
Normal file
20
tests/example.test.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { setup, $fetch, isDev } from '@nuxt/test-utils-edge'
|
||||
|
||||
describe('example', async () => {
|
||||
await setup({
|
||||
rootDir: fileURLToPath(new URL('..', import.meta.url)),
|
||||
server: true,
|
||||
})
|
||||
|
||||
it('Renders Nuxt 3 boilarplate', async () => {
|
||||
expect(await $fetch('/')).toMatch('Nuxt 3 boilarplate')
|
||||
})
|
||||
|
||||
if (isDev()) {
|
||||
it('[dev] ensure vite client script is added', async () => {
|
||||
expect(await $fetch('/')).toMatch('/_nuxt/@vite/client"')
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user