@@ -65,14 +65,14 @@ This can be useful if you have a unit test that mocks API calls and you need to
6565wait for your mock promises to all resolve .
6666
6767If you return a promise in the ` waitFor ` callback (either explicitly or
68- implicitly with ` async ` syntax ), then the ` waitFor ` utility will not call your
69- callback again until that promise rejects . This allows you to ` waitFor ` things
70- that must be checked asynchronously .
68+ implicitly with the ` async ` syntax ), then the ` waitFor ` utility does not call
69+ your callback again until that promise rejects . This allows you to ` waitFor `
70+ things that must be checked asynchronously .
7171
7272The default ` container ` is the global ` document ` . Make sure the elements you
7373wait for are descendants of ` container ` .
7474
75- The default ` interval ` is ` 50ms ` . However it will run your callback immediately
75+ The default ` interval ` is ` 50ms ` . However it runs your callback immediately
7676before starting the intervals .
7777
7878The default ` timeout ` is ` 1000ms ` .
@@ -83,9 +83,9 @@ what caused the timeout.
8383
8484The default ` mutationObserverOptions ` is
8585` {subtree: true, childList: true, attributes: true, characterData: true} ` which
86- will detect additions and removals of child elements (including text nodes ) in
87- the ` container ` and any of its descendants . It will also detect attribute
88- changes . When any of those changes occur , it will re - run the callback .
86+ detects additions and removals of child elements (including text nodes ) in the
87+ ` container ` and any of its descendants . It also detects attribute changes . When
88+ any of those changes occur , it re - runs the callback .
8989
9090## ` waitForElementToBeRemoved `
9191
@@ -125,8 +125,8 @@ el.parentElement.removeChild(el)
125125// logs 'Element no longer in DOM'
126126` ` `
127127
128- ` waitForElementToBeRemoved ` will throw an error if the first argument is ` null `
129- or an empty array :
128+ ` waitForElementToBeRemoved ` throws an error if the first argument is ` null ` or
129+ an empty array :
130130
131131` ` ` javascript
132132waitForElementToBeRemoved(null).catch(err => console.log(err))
0 commit comments