@case-contract-testing/case
Version:
Next-generation contract testing suite
13 lines (12 loc) • 752 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.StripUnsupportedError = void 0;
const locationString = (matchContext) => `(at ${matchContext['case:currentRun:context:location'].join('.')})`;
class StripUnsupportedError extends Error {
constructor(matcher, context) {
super(`Matchers of type '${matcher['case:matcher:type']}' do not support stripMatchers() without an example. This is an auxillery matcher designed to be used with \`and()\`, and must be combined with a matcher that can be stripped. At: ${locationString(context)}`);
Object.setPrototypeOf(this, new.target.prototype);
this.name = StripUnsupportedError.name;
}
}
exports.StripUnsupportedError = StripUnsupportedError;