schlechtenburg/vitest-example/HelloWorld.test.ts

11 lines
315 B
TypeScript
Raw Permalink Normal View History

2024-10-08 07:15:26 +00:00
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()
})