( received: any, matcherName: string, expectedArgument: string, options: MatcherHintOptions, )
| 1263 | typeof received.calls.count === 'function'; |
| 1264 | |
| 1265 | const ensureMockOrSpy = ( |
| 1266 | received: any, |
| 1267 | matcherName: string, |
| 1268 | expectedArgument: string, |
| 1269 | options: MatcherHintOptions, |
| 1270 | ) => { |
| 1271 | if (!isMock(received) && !isSpy(received)) { |
| 1272 | throw new Error( |
| 1273 | matcherErrorMessage( |
| 1274 | matcherHint(matcherName, undefined, expectedArgument, options), |
| 1275 | `${RECEIVED_COLOR('received')} value must be a mock or spy function`, |
| 1276 | printWithType('Received', received, printReceived), |
| 1277 | ), |
| 1278 | ); |
| 1279 | } |
| 1280 | }; |
| 1281 | |
| 1282 | const ensureMock = ( |
| 1283 | received: any, |
no test coverage detected