Skip to content

Commit

Permalink
Fix timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
dompuiu committed Nov 7, 2018
1 parent 058f896 commit 4f10bf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/__tests__/initRules.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,6 @@ describe('initRules', function() {
module.exports = jasmine.createSpy().and.callFake(function() {
return new Promise(function(resolve) {
setTimeout(function() {
callOrder.push('Action1');
resolve();
}, 3000);

Expand Down
10 changes: 5 additions & 5 deletions src/initRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var logQueueWarningOnce = function() {
queueWarningLogged = true;
logger.warn(
'Rule queueing is only intended for testing purposes. Queueing behavior may be ' +
'changed or removed at any time.'
'changed or removed at any time.'
);
}
};
Expand Down Expand Up @@ -149,9 +149,9 @@ module.exports = function(
);
}, PROMISE_TIMEOUT);

resolve(
Promise.resolve(
executeDelegateModule(condition, syntheticEvent, [syntheticEvent])
);
).then(resolve, reject);
})
.catch(function(e) {
clearTimeout(timeoutId);
Expand Down Expand Up @@ -184,9 +184,9 @@ module.exports = function(
);
}, PROMISE_TIMEOUT);

resolve(
Promise.resolve(
executeDelegateModule(action, syntheticEvent, [syntheticEvent])
);
).then(resolve, reject);
})
.then(function() {
clearTimeout(timeoutId);
Expand Down

0 comments on commit 4f10bf0

Please sign in to comment.