mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Merge pull request #8301 from shiver-me-timbers/master
Fixed the jsmockito verify() functions signature so that the verifier argument is now optional.
This commit is contained in:
@@ -33,6 +33,7 @@ function test_JsMockito_when() {
|
||||
}
|
||||
|
||||
function test_JsMockito_verify() {
|
||||
JsMockito.verify(new TestClass()).test();
|
||||
JsMockito.verify(new TestClass(), new TestVerifier()).test();
|
||||
}
|
||||
|
||||
@@ -129,6 +130,7 @@ function test_when() {
|
||||
}
|
||||
|
||||
function test_verify() {
|
||||
verify(new TestClass()).test();
|
||||
verify(new TestClass(), new TestVerifier()).test();
|
||||
}
|
||||
|
||||
|
||||
Vendored
+2
@@ -378,6 +378,7 @@ declare module JsMockito {
|
||||
* @param verifier Optional JsMockito.Verifier instance (default: JsMockito.Verifiers.once())
|
||||
* @return {T} A verifier on which the method or function to be verified can be invoked
|
||||
*/
|
||||
export function verify<T>(mock: T): T;
|
||||
export function verify<T>(mock: T, verifier: Verifier): T;
|
||||
|
||||
/**
|
||||
@@ -587,6 +588,7 @@ declare function when<T>(mock: T): T;
|
||||
* @param verifier Optional JsMockito.Verifier instance (default: JsMockito.Verifiers.once())
|
||||
* @return {T} A verifier on which the method or function to be verified can be invoked
|
||||
*/
|
||||
declare function verify<T>(mock: T): T;
|
||||
declare function verify<T>(mock: T, verifier: JsMockito.Verifier): T;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user