UNPKG

@serenity-js/core

Version:

The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure

35 lines 1.4 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Unanswered = void 0; const node_util_1 = __importDefault(require("node:util")); const tiny_types_1 = require("tiny-types"); /** * A placeholder value signifying that a [`Question`](https://serenity-js.org/api/core/class/Question/) * has not been answered by an [`Actor`](https://serenity-js.org/api/core/class/Actor/) when producing an [`ExpectationOutcome`](https://serenity-js.org/api/core/class/ExpectationOutcome/). * This happens when Serenity/JS decides that answering a given question * won't affect the outcome. * * For example, making the actor answer questions about the expected value * and the actual value of each list item is unnecessary if we already know that the list itself is empty. * * @group Questions */ class Unanswered extends tiny_types_1.TinyType { static isUnanswered(value) { return value instanceof Unanswered; } [node_util_1.default.inspect.custom]() { return `<<unanswered>>`; } toString() { return 'unanswered'; } toJSON() { return undefined; // eslint-disable-line unicorn/no-useless-undefined } } exports.Unanswered = Unanswered; //# sourceMappingURL=Unanswered.js.map