Skip to content

Commit 9f5e8e4

Browse files
authored
Merge pull request #63 from testing-library/afontcu-patch-1
Fix small tweaks in example
2 parents cdc2ace + 33d02c5 commit 9f5e8e4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/__tests__/disappearance.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import { render, waitForElementToBeRemoved } from '@testing-library/vue'
22
import Disappearance from './components/Disappearance'
33
import '@testing-library/jest-dom/extend-expect'
44

5-
test('it waits for the data to be loaded', async () => {
5+
test('waits for the data to be loaded', async () => {
66
const { getByText, queryByText, queryByTestId } = render(Disappearance)
77

88
// Assert initial state
99
getByText('Loading...')
1010
expect(queryByText(/Loaded this message/)).not.toBeInTheDocument()
1111

12-
// Line reads as follows "Wait until element with test 'Loading...' is gone."
12+
// Line reads as follows: "Wait until element with text 'Loading...' is gone."
1313
await waitForElementToBeRemoved(() => queryByText('Loading...'))
1414
// It is equivalent to:
1515
//
@@ -19,8 +19,7 @@ test('it waits for the data to be loaded', async () => {
1919
//
2020
// `wait()` waits until the callback function passes or times out.
2121

22-
// After 'Loading...' element is gone, we can assert that fetched data is
23-
// rendered.
22+
// After 'Loading...' is gone, we can assert that fetched data is rendered.
2423
expect(queryByTestId('message')).toHaveTextContent(/Hello World/)
2524

2625
// Read more about async utilities:

0 commit comments

Comments
 (0)