UNPKG

sinon-chai-calls-assertion

Version:

A simple sinon-chai assertion to validate many aspects of stub calls

14 lines (13 loc) 562 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkCallsErrors = void 0; const check_single_call_error_1 = require("./check-single-call-error"); function checkCallsErrors(actualCall, expectedCall, compareFunc) { let errors = ''; const max = Math.min(expectedCall.length, actualCall.args.length); for (let i = 0; i < max; i++) { errors += check_single_call_error_1.checkSingleCallError(actualCall, i, expectedCall[i], compareFunc); } return errors; } exports.checkCallsErrors = checkCallsErrors;