UNPKG

733 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const find_last_stubbing_match_1 = require("./find-last-stubbing-match");
4const invoke_callbacks_1 = require("./invoke-callbacks");
5const notify_after_satisfaction_1 = require("../matchers/notify-after-satisfaction");
6const deliver_outcome_1 = require("./deliver-outcome");
7function satisfy(double, call) {
8 const stubbing = find_last_stubbing_match_1.default(double, call);
9 if (stubbing) {
10 stubbing.addSatisfyingCall(call);
11 invoke_callbacks_1.default(stubbing, call);
12 notify_after_satisfaction_1.default(stubbing.args, call.args);
13 return deliver_outcome_1.default(stubbing, call);
14 }
15}
16exports.default = satisfy;