[jest] add toHaveBeenNthCalledWith matcher

This commit is contained in:
Andrew Makarov
2018-06-09 11:52:11 +03:00
parent ebadb7272e
commit ce4abcf585
+6
View File
@@ -13,6 +13,7 @@
// Ahn <https://github.com/AhnpGit>
// Josh Goldberg <https://github.com/joshuakgoldberg>
// Bradley Ayers <https://github.com/bradleyayers>
// Andrew Makarov <https://github.com/r3nya>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -473,6 +474,11 @@ declare namespace jest {
* to test what arguments it was last called with.
*/
toHaveBeenLastCalledWith(...params: any[]): R;
/**
* If you have a mock function, you can use `.toHaveBeenNthCalledWith`
* to test what arguments it was nth called with.
*/
toHaveBeenNthCalledWith(nthCall: number, ...params: any[]): R;
/**
* Used to check that an object has a `.length` property
* and it is set to a certain numeric value.