From c2b80d5ccb264fde54ec284bc0edd32078401aec Mon Sep 17 00:00:00 2001 From: Artur Soler Date: Fri, 14 Mar 2014 18:41:59 +0100 Subject: [PATCH 1/3] Add ddescribe and iit function definitions. --- jasmine/jasmine.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts index 4c01b347b..c86d8d4e5 100644 --- a/jasmine/jasmine.d.ts +++ b/jasmine/jasmine.d.ts @@ -5,10 +5,13 @@ declare function describe(description: string, specDefinitions: () => void): void; +declare function ddescribe(description: string, specDefinitions: () => void): void; declare function xdescribe(description: string, specDefinitions: () => void): void; declare function it(expectation: string, assertion?: () => void): void; declare function it(expectation: string, assertion?: (done: () => void) => void): void; +declare function iit(expectation: string, assertion?: () => void): void; +declare function iit(expectation: string, assertion?: (done: () => void) => void): void; declare function xit(expectation: string, assertion?: () => void): void; declare function xit(expectation: string, assertion?: (done: () => void) => void): void; @@ -95,11 +98,13 @@ declare module jasmine { addReporter(reporter: Reporter): void; execute(): void; describe(description: string, specDefinitions: () => void): Suite; + ddescribe(description: string, specDefinitions: () => void): Suite; beforeEach(beforeEachFunction: () => void): void; currentRunner(): Runner; afterEach(afterEachFunction: () => void): void; xdescribe(desc: string, specDefinitions: () => void): XSuite; it(description: string, func: () => void): Spec; + iit(description: string, func: () => void): Spec; xit(desc: string, func: () => void): XSpec; compareRegExps_(a: RegExp, b: RegExp, mismatchKeys: string[], mismatchValues: string[]): boolean; compareObjects_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean; From 814f95190ab6b65e50046f2b2528967ac4d5a5c3 Mon Sep 17 00:00:00 2001 From: Artur Soler Date: Fri, 14 Mar 2014 18:43:04 +0100 Subject: [PATCH 2/3] callFake can receive a function that takes parameters. --- jasmine/jasmine.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts index c86d8d4e5..2abc82ceb 100644 --- a/jasmine/jasmine.d.ts +++ b/jasmine/jasmine.d.ts @@ -367,7 +367,7 @@ declare module jasmine { /** By chaining the spy with and.returnValue, all calls to the function will return a specific value. */ returnValue(val: any): void; /** By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied function. */ - callFake(fn: () => any): void; + callFake(fn: Function): void; /** By chaining the spy with and.throwError, all calls to the spy will throw the specified value. */ throwError(msg: string): void; /** When a calling strategy is used for a spy, the original stubbing behavior can be returned at any time with and.stub. */ From 73747f076ca1593da4fd69d79b993053ddd9bc7d Mon Sep 17 00:00:00 2001 From: Artur Soler Date: Fri, 14 Mar 2014 18:44:29 +0100 Subject: [PATCH 3/3] calls is an object (it should probably be defined), not an array. --- jasmine/jasmine.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts index 2abc82ceb..794538ec5 100644 --- a/jasmine/jasmine.d.ts +++ b/jasmine/jasmine.d.ts @@ -354,7 +354,7 @@ declare module jasmine { identity: string; and: SpyAnd; - calls: any[]; + calls: any; mostRecentCall: { args: any[]; }; argsForCall: any[]; wasCalled: boolean;