tests: Use default arguments for `helper.waitFor`

Now `helper.waitFor(fn, 0)` times out immediately (as expected in
tests) instead of waiting 1900ms.
pull/4415/head
Richard Hansen 2020-10-11 22:02:25 -04:00 committed by John McLear
parent 16b0768a93
commit 262eb9af60
1 changed files with 1 additions and 4 deletions

View File

@ -158,10 +158,7 @@ var helper = {};
return padName;
}
helper.waitFor = function(conditionFunc, _timeoutTime, _intervalTime){
var timeoutTime = _timeoutTime || 1900;
var intervalTime = _intervalTime || 10;
helper.waitFor = function(conditionFunc, timeoutTime = 1900, intervalTime = 10) {
var deferred = $.Deferred();
const _fail = deferred.fail.bind(deferred);