mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
tests: Accept async condition functions for helper.waitFor()
This commit is contained in:
parent
8dca4cb16f
commit
09e9c36098
2 changed files with 15 additions and 2 deletions
|
@ -211,9 +211,9 @@ const helper = {};
|
|||
return _fail(...args);
|
||||
};
|
||||
|
||||
const check = () => {
|
||||
const check = async () => {
|
||||
try {
|
||||
if (!conditionFunc()) return;
|
||||
if (!await conditionFunc()) return;
|
||||
deferred.resolve();
|
||||
} catch (err) {
|
||||
deferred.reject(err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue