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

Commit

Permalink
fix(jasmine): propagate all arguments of it/describe/etc...
Browse files Browse the repository at this point in the history
  • Loading branch information
mhevery committed Sep 2, 2016
1 parent 5f1ea90 commit a85fd68
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/jasmine/jasmine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});

Expand Down

0 comments on commit a85fd68

Please sign in to comment.