16 lines
438 B
TypeScript
16 lines
438 B
TypeScript
// @noErrors
|
|
import { it, expect } from 'vitest'
|
|
// ---cut---
|
|
// tests/components/SomeComponents.nuxt.spec.ts
|
|
import { mountSuspended } from '@nuxt/test-utils/runtime'
|
|
import Index from '~/pages/index.vue'
|
|
|
|
// tests/App.nuxt.spec.ts
|
|
it('can also mount an app', async () => {
|
|
const component = await mountSuspended(Index, { route: '/test' })
|
|
expect(component.html()).toMatchInlineSnapshot(`
|
|
"<h1>Hello World</h1>"
|
|
`)
|
|
})
|
|
|