schlechtenburg/vitest-example/HelloWorld.test.ts
2024-10-08 09:15:26 +02:00

11 lines
315 B
TypeScript

import { expect, test } from 'vitest'
import { render } from 'vitest-browser-vue'
import HelloWorld from './HelloWorld.vue'
test('renders name', async () => {
const { getByText } = render(HelloWorld, {
props: { name: 'Vitest' },
})
await expect.element(getByText('Hello Vitest!')).toBeInTheDocument()
})