Skip to content

Commit c0a4eb2

Browse files
author
Kent C. Dodds
authored
fix(find*): waitForElement was still in use (#476)
1 parent 1b711a4 commit c0a4eb2

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/query-helpers.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {fuzzyMatches, matches, makeNormalizer} from './matches'
2-
import {waitForElement} from './wait-for-element'
2+
import {waitFor} from './wait-for'
33
import {getConfig} from './config'
44

55
function getMultipleElementsFoundError(message, container) {
@@ -65,13 +65,10 @@ function makeGetAllQuery(allQuery, getMissingError) {
6565
}
6666

6767
// this accepts a getter query function and returns a function which calls
68-
// waitForElement and passing a function which invokes the getter.
68+
// waitFor and passing a function which invokes the getter.
6969
function makeFindQuery(getter) {
70-
return (container, text, options, waitForElementOptions) =>
71-
waitForElement(
72-
() => getter(container, text, options),
73-
waitForElementOptions,
74-
)
70+
return (container, text, options, waitForOptions) =>
71+
waitFor(() => getter(container, text, options), waitForOptions)
7572
}
7673

7774
function buildQueries(queryAllBy, getMultipleError, getMissingError) {

0 commit comments

Comments
 (0)