Skip to content

Commit c1c7f69

Browse files
nknappNagRock
authored andcommitted
Fix return types of match()-, objectContaining()- and strictEqual()-matchers
Those matchers have the return type "Matcher" at the moment, but in order to use them in a verfify()-call, they need "any" or something else that matches the method parameter
1 parent 7698e8a commit c1c7f69

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ts-mockito.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,16 @@ export function notNull(): any {
112112
return new NotNullMatcher() as any;
113113
}
114114

115-
export function strictEqual(expectedValue: any): Matcher {
116-
return new StrictEqualMatcher(expectedValue);
115+
export function strictEqual(expectedValue: any): any {
116+
return new StrictEqualMatcher(expectedValue) as any;
117117
}
118118

119-
export function match(expectedValue: RegExp | string): Matcher {
120-
return new MatchingStringMatcher(expectedValue);
119+
export function match(expectedValue: RegExp | string): any {
120+
return new MatchingStringMatcher(expectedValue) as any;
121121
}
122122

123-
export function objectContaining(expectedValue: Object): Matcher {
124-
return new ObjectContainingMatcher(expectedValue);
123+
export function objectContaining(expectedValue: Object): any {
124+
return new ObjectContainingMatcher(expectedValue) as any;
125125
}
126126

127127
// Export default object with all members (ember-browserify doesn't support named exports).

0 commit comments

Comments
 (0)