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
parent
16b0768a93
commit
262eb9af60
|
@ -158,10 +158,7 @@ var helper = {};
|
||||||
return padName;
|
return padName;
|
||||||
}
|
}
|
||||||
|
|
||||||
helper.waitFor = function(conditionFunc, _timeoutTime, _intervalTime){
|
helper.waitFor = function(conditionFunc, timeoutTime = 1900, intervalTime = 10) {
|
||||||
var timeoutTime = _timeoutTime || 1900;
|
|
||||||
var intervalTime = _intervalTime || 10;
|
|
||||||
|
|
||||||
var deferred = $.Deferred();
|
var deferred = $.Deferred();
|
||||||
|
|
||||||
const _fail = deferred.fail.bind(deferred);
|
const _fail = deferred.fail.bind(deferred);
|
||||||
|
|
Loading…
Reference in New Issue