add ui testing
All checks were successful
Backend Actions / check (push) Successful in 13s
Backend Actions / build (push) Successful in 28s
Backend Actions / test (push) Successful in 37s

This commit is contained in:
2025-07-25 17:28:41 +01:00
parent 70835f04fa
commit 8c12ca0024
7 changed files with 608 additions and 5 deletions

View 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>"
`)
})