@case-contract-testing/case
Version:
Next-generation contract testing suite
16 lines (15 loc) • 620 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CaseFailedAssertionError = void 0;
class CaseFailedAssertionError extends Error {
matchResult;
constructor(matchResult) {
super(`ContractCase example failed to match the expectations: \n\n${matchResult
.map((r) => `${r.message}`)
.reduce((acc, curr) => `${acc}\n${curr}`)}`);
Object.setPrototypeOf(this, new.target.prototype);
this.name = CaseFailedAssertionError.name;
this.matchResult = matchResult;
}
}
exports.CaseFailedAssertionError = CaseFailedAssertionError;