( received: any, matcherName: string, expectedArgument: string, options: MatcherHintOptions, )
| 1280 | }; |
| 1281 | |
| 1282 | const ensureMock = ( |
| 1283 | received: any, |
| 1284 | matcherName: string, |
| 1285 | expectedArgument: string, |
| 1286 | options: MatcherHintOptions, |
| 1287 | ) => { |
| 1288 | if (!isMock(received)) { |
| 1289 | throw new Error( |
| 1290 | matcherErrorMessage( |
| 1291 | matcherHint(matcherName, undefined, expectedArgument, options), |
| 1292 | `${RECEIVED_COLOR('received')} value must be a mock function`, |
| 1293 | printWithType('Received', received, printReceived), |
| 1294 | ), |
| 1295 | ); |
| 1296 | } |
| 1297 | }; |
| 1298 | |
| 1299 | export default spyMatchers; |
no test coverage detected