From ff104ed7cc13a3eb2e89f46242c4dbdbbe66665e Mon Sep 17 00:00:00 2001 From: Roman Fromrome Date: Tue, 8 Sep 2015 15:59:55 -0700 Subject: [PATCH] optional expectationFailOutput parameter added to matchers optional expectationFailOutput parameter added to matchers for ability to track expectation fail reason in output message --- jasmine/jasmine.d.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts index 581353b348..184875fa2d 100644 --- a/jasmine/jasmine.d.ts +++ b/jasmine/jasmine.d.ts @@ -58,7 +58,7 @@ declare module jasmine { function addMatchers(matchers: CustomMatcherFactories): void; function stringMatching(str: string): Any; function stringMatching(str: RegExp): Any; - + interface Any { new (expectedClass: any): any; @@ -72,7 +72,7 @@ declare module jasmine { length: number; [n: number]: T; } - + interface ArrayContaining { new (sample: any[]): any; @@ -279,21 +279,21 @@ declare module jasmine { isNot?: boolean; message(): any; - toBe(expected: any): boolean; - toEqual(expected: any): boolean; - toMatch(expected: any): boolean; - toBeDefined(): boolean; - toBeUndefined(): boolean; - toBeNull(): boolean; + toBe(expected: any, expectationFailOutput?: any): boolean; + toEqual(expected: any, expectationFailOutput?: any): boolean; + toMatch(expected: any, expectationFailOutput?: any): boolean; + toBeDefined(expectationFailOutput?: any): boolean; + toBeUndefined(expectationFailOutput?: any): boolean; + toBeNull(expectationFailOutput?: any): boolean; toBeNaN(): boolean; - toBeTruthy(): boolean; - toBeFalsy(): boolean; + toBeTruthy(expectationFailOutput?: any): boolean; + toBeFalsy(expectationFailOutput?: any): boolean; toHaveBeenCalled(): boolean; toHaveBeenCalledWith(...params: any[]): boolean; - toContain(expected: any): boolean; - toBeLessThan(expected: any): boolean; - toBeGreaterThan(expected: any): boolean; - toBeCloseTo(expected: any, precision: any): boolean; + toContain(expected: any, expectationFailOutput?: any): boolean; + toBeLessThan(expected: any, expectationFailOutput?: any): boolean; + toBeGreaterThan(expected: any, expectationFailOutput?: any): boolean; + toBeCloseTo(expected: any, precision: any, expectationFailOutput?: any): boolean; toContainHtml(expected: string): boolean; toContainText(expected: string): boolean; toThrow(expected?: any): boolean; @@ -450,7 +450,7 @@ declare module jasmine { /** By chaining the spy with calls.reset(), will clears all tracking for a spy **/ reset(): void; } - + interface CallInfo { /** The context (the this) for the call */ object: any;