Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(waitForFunction): handle predicate that throws (#2488)
Currently, we fail when the predicate throws on the first call, and timeout when it fails on any other call. There are two possible ways to handle throwing predicates: - Fail waitForFunction if predicate throws once. This is good since it gives you the error faster. - Tolerate predicate exceptions. This is good because you do not have to worry about non-initialized state during load. This change implements the former.
- Loading branch information
Showing
2 changed files
with
40 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters