(
calledWith: string,
)
| 199 | 'toHaveBeenCalledWith', |
| 200 | ] as const)('%s', calledWith => { |
| 201 | function isToHaveNth( |
| 202 | calledWith: string, |
| 203 | ): calledWith is 'toHaveBeenNthCalledWith' { |
| 204 | return calledWith === 'toHaveBeenNthCalledWith'; |
| 205 | } |
| 206 | |
| 207 | test('works only on spies or jest.fn', () => { |
| 208 | const fn = function fn() {}; |