Skip to content

Commit

Permalink
fix(browser): make example test callbacks async (#6484)
Browse files Browse the repository at this point in the history
  • Loading branch information
aqandrew authored Sep 12, 2024
1 parent 9f1fd18 commit 16aa76c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vitest/src/create/browser/examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { expect, test } from 'vitest'
import { render } from '@testing-library/jsx'
import HelloWorld from './HelloWorld.jsx'
test('renders name', () => {
test('renders name', async () => {
const { getByText } = render(<HelloWorld name="Vitest" />)
await expect.element(getByText('Hello Vitest!')).toBeInTheDocument()
})
Expand Down Expand Up @@ -67,7 +67,7 @@ import { expect, test } from 'vitest'
import { render } from 'vitest-browser-vue'
import HelloWorld from './HelloWorld.vue'
test('renders name', () => {
test('renders name', async () => {
const { getByText } = render(HelloWorld, {
props: { name: 'Vitest' },
})
Expand Down Expand Up @@ -97,7 +97,7 @@ import { expect, test } from 'vitest'
import { render } from 'vitest-browser-svelte'
import HelloWorld from './HelloWorld.svelte'
test('renders name', () => {
test('renders name', async () => {
const { getByText } = render(HelloWorld, { name: 'Vitest' })
await expect.element(getByText('Hello Vitest!')).toBeInTheDocument()
})
Expand Down

0 comments on commit 16aa76c

Please # to comment.