@contract-case/case-core
Version:
Core functionality for the ContractCase contract testing suite
22 lines • 846 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CaseFailedAssertionError = void 0;
/**
* This is thrown by ContractCase core when expectations set up in the test were not met.
*
* If implementing a plugin, do not throw this during a matcher execution,
* instead return a {@link MatchResult} that contains the appropriate error.
*
* @public
*/
class CaseFailedAssertionError extends Error {
matchResult;
constructor(errorMessage, matchResult) {
super(`Actual interaction didn't match the definition\n${errorMessage}`);
Object.setPrototypeOf(this, new.target.prototype);
this.name = 'CaseFailedAssertionError';
this.matchResult = matchResult;
}
}
exports.CaseFailedAssertionError = CaseFailedAssertionError;
//# sourceMappingURL=CaseFailedAssertionError.js.map