@ethereum-waffle/chai
Version:
A sweet set of chai matchers for your blockchain testing needs.
17 lines • 907 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.supportCalledOnContractWith = void 0;
const calledOnContractValidators_1 = require("./calledOnContractValidators");
const assertions_1 = require("./assertions");
function supportCalledOnContractWith(Assertion) {
Assertion.addMethod('calledOnContractWith', function (contract, parameters) {
const fnName = this._obj;
const negated = this.__flags.negate;
(0, calledOnContractValidators_1.validateContract)(contract);
(0, calledOnContractValidators_1.validateMockProvider)(contract.provider);
(0, calledOnContractValidators_1.validateFnName)(fnName, contract);
(0, assertions_1.assertCalledWithParams)(this, contract, fnName, parameters, negated);
});
}
exports.supportCalledOnContractWith = supportCalledOnContractWith;
//# sourceMappingURL=calledOnContractWith.js.map