Skip to content

Commit 8f8b85f

Browse files
[#78] Updated readme to add wait best practice recommendation that was given by Kent in issue 78.
1 parent 1dfcd73 commit 8f8b85f

File tree

7 files changed

+279
-0
lines changed

7 files changed

+279
-0
lines changed

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/react-testing-library.iml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 239 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@ The default `interval` is `50ms`. However it will run your callback immediately
374374
on the next tick of the event loop (in a `setTimeout`) before starting the
375375
intervals.
376376

377+
> NOTE: `wait`'s callback can be called many times and because of this you should use as few `wait` calls as possible in each test and put minimum amount of code that absolutely needs to be waited on inside each `wait`'s `callback`. This will help your tests run faster and can avoid unnecessary runtime complexity.
378+
377379
### `waitForElement`
378380

379381
See [dom-testing-library#waitForElement](https://github.com/kentcdodds/dom-testing-library#waitforelement)

0 commit comments

Comments
 (0)