add ui testing
This commit is contained in:
15
ui/app/pages/index.spec.ts
Normal file
15
ui/app/pages/index.spec.ts
Normal file
@ -0,0 +1,15 @@
|
||||
// @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>"
|
||||
`)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user