UNPKG

@fgv/ts-utils-jest

Version:
12 lines 430 B
import { equals } from '@jest/expect-utils'; export const matcherName = 'toHaveBeenCalledWithArgumentsMatching'; export function predicate(received, expected) { for (let i = 0; i < received.mock.calls.length; i++) { const args = received.mock.calls[i]; if (equals(args, expected)) { return { index: i, arguments: args }; } } return undefined; } //# sourceMappingURL=predicate.js.map