From a85fd6873cb501187398042e025c804d11ee85b4 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 1 Sep 2016 13:21:43 -0700 Subject: [PATCH] fix(jasmine): propagate all arguments of it/describe/etc... --- lib/jasmine/jasmine.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/jasmine/jasmine.ts b/lib/jasmine/jasmine.ts index 9759b6efe..ee166b53d 100644 --- a/lib/jasmine/jasmine.ts +++ b/lib/jasmine/jasmine.ts @@ -39,14 +39,16 @@ }); ['it', 'xit', 'fit'].forEach((methodName) => { let originalJasmineFn: Function = jasmineEnv[methodName]; - jasmineEnv[methodName] = function(description: string, specDefinitions: Function) { - return originalJasmineFn.call(this, description, wrapTestInZone(specDefinitions)); + jasmineEnv[methodName] = function(description: string, specDefinitions: Function, timeout: number) { + arguments[1] = wrapTestInZone(specDefinitions); + return originalJasmineFn.apply(this, arguments); } }); ['beforeEach', 'afterEach'].forEach((methodName) => { let originalJasmineFn: Function = jasmineEnv[methodName]; jasmineEnv[methodName] = function(specDefinitions: Function) { - return originalJasmineFn.call(this, wrapTestInZone(specDefinitions)); + arguments[0] = wrapTestInZone(specDefinitions); + return originalJasmineFn.apply(this, arguments); } });