chore: bump Flow and ESLint preset (#241)

* chore: bump Flow and ESLint preset

* fix name of waitForElement
This commit is contained in:
Michał Pierzchała
2019-12-09 11:43:05 +01:00
committed by Kacper Wiszczuk
parent 4c77f4a7dc
commit 94ff42527e
12 changed files with 405 additions and 202 deletions
+2 -2
View File
@@ -318,14 +318,14 @@ expect(onEndReached).toHaveBeenCalled();
Defined as:
```jsx
function waitForExpect<T: *>(
function waitForElement<T>(
expectation: () => T,
timeout: number = 4500,
interval: number = 50
): Promise<T> {}
```
Waits for non-deterministic periods of time until your element appears or times out. `waitForExpect` periodically calls `expectation` every `interval` milliseconds to determine whether the element appeared or not.
Waits for non-deterministic periods of time until your element appears or times out. `waitForElement` periodically calls `expectation` every `interval` milliseconds to determine whether the element appeared or not.
```jsx
import { render, waitForElement } from 'react-testing-library';