From 2dde7171c4e0bf1ab18d899ab3949861b930f588 Mon Sep 17 00:00:00 2001 From: Marc Laval Date: Tue, 30 Jun 2015 19:15:16 +0200 Subject: [PATCH] fix(jasmine patch): forward timeout --- lib/jasmine/patch.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/jasmine/patch.js b/lib/jasmine/patch.js index f0959b3e8..45dbf052c 100644 --- a/lib/jasmine/patch.js +++ b/lib/jasmine/patch.js @@ -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); } };