testdouble
Version:
A minimal test double library for TDD with JavaScript
14 lines (13 loc) • 582 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const lodash_1 = require("../wrap/lodash");
const is_matcher_1 = require("./is-matcher");
// TODO: after rewrite, update signature to take (Stubbing/Verification, Call)
function notifyAfterSatisfaction(expectedArgs, actualArgs) {
lodash_1.default.each(expectedArgs, (expectedArg, i) => {
if ((0, is_matcher_1.default)(expectedArg)) {
lodash_1.default.invoke(expectedArg, '__matches.afterSatisfaction', actualArgs[i]);
}
});
}
exports.default = notifyAfterSatisfaction;
;