Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
fix(jasmine patch): forward timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
marclaval authored and vicb committed Jul 1, 2015
1 parent ee4262a commit 2dde717
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/jasmine/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@ function apply() {
var originalIt = global.it;
var originalFit = global.fit;

global.it = function zoneResettingIt(description, specFn) {
global.it = function zoneResettingIt(description, specFn, timeOut) {
if (specFn.length) {
originalIt(description, function zoneResettingSpecFn(originalDone) {
specFn(function zoneResettingDone() {
jasmineZone.run(originalDone);
});
});
}, timeOut);
} else {
originalIt(description, specFn);
originalIt(description, specFn, timeOut);
}
};

global.fit = function zoneResettingFit(description, specFn) {
global.fit = function zoneResettingFit(description, specFn, timeOut) {
if (specFn.length) {
originalFit(description, function zoneResettingSpecFn(originalDone) {
specFn(function zoneResettingDone() {
jasmineZone.run(originalDone);
});
});
}, timeOut);
} else {
originalFit(description, specFn);
originalFit(description, specFn, timeOut);
}
};

Expand Down

0 comments on commit 2dde717

Please sign in to comment.