UNPKG

@contract-case/case-plugin-base

Version:

Plugin framework for writing plugins for the ContractCase test framework

21 lines 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StripUnsupportedError = void 0; const locationString = (matchContext) => `(at ${matchContext['_case:currentRun:context:location'].join('.')})`; /** * Tried to strip matchers from something that doesn't have an example * * Throw this during `matcher.strip` execution if `strip` has been called when the * results can't be reconciled without an example. * * @public */ 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 auxiliary 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'; } } exports.StripUnsupportedError = StripUnsupportedError; //# sourceMappingURL=StripUnsupportedError.js.map