Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove 'will' from docs #1205

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/dom-testing-library/api-async.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ This can be useful if you have a unit test that mocks API calls and you need to
wait for your mock promises to all resolve.

If you return a promise in the `waitFor` callback (either explicitly or
implicitly with `async` syntax), then the `waitFor` utility will not call your
callback again until that promise rejects. This allows you to `waitFor` things
that must be checked asynchronously.
implicitly with the `async` syntax), then the `waitFor` utility does not call
your callback again until that promise rejects. This allows you to `waitFor`
things that must be checked asynchronously.

The default `container` is the global `document`. Make sure the elements you
wait for are descendants of `container`.

The default `interval` is `50ms`. However it will run your callback immediately
The default `interval` is `50ms`. However it runs your callback immediately
before starting the intervals.

The default `timeout` is `1000ms`.
Expand All @@ -83,9 +83,9 @@ what caused the timeout.

The default `mutationObserverOptions` is
`{subtree: true, childList: true, attributes: true, characterData: true}` which
will detect additions and removals of child elements (including text nodes) in
the `container` and any of its descendants. It will also detect attribute
changes. When any of those changes occur, it will re-run the callback.
detects additions and removals of child elements (including text nodes) in the
`container` and any of its descendants. It also detects attribute changes. When
any of those changes occur, it re-runs the callback.

## `waitForElementToBeRemoved`

Expand Down Expand Up @@ -125,8 +125,8 @@ el.parentElement.removeChild(el)
// logs 'Element no longer in DOM'
```

`waitForElementToBeRemoved` will throw an error if the first argument is `null`
or an empty array:
`waitForElementToBeRemoved` throws an error if the first argument is `null` or
an empty array:

```javascript
waitForElementToBeRemoved(null).catch(err => console.log(err))
Expand Down