Skip to main content

Unanswered

A placeholder value signifying that a Question has not been answered by an Actor when producing an 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.

Hierarchy

  • TinyType
    • Unanswered

Index

Constructors

constructor

  • Returns Unanswered

Methods

externalequals

  • equals(another: TinyType): boolean
  • @desc

    Compares two tiny types by value

    @example

    Comparing simple types

    class Id extends TinyTypeOf<string>() {}

    const id = new Id(`3cc0852d-fda7-4f61-874e-0cfadbd6182a`);

    id.equals(id) === true
    @example

    Comparing complex types recursively

    class FirstName extends TinyTypeOf<string>() {}
    class LastName extends TinyTypeOf<string>() {}
    class Age extends TinyTypeOf<number>() {}

    class Person extends TinyType {
    constructor(public readonly firstName: FirstName,
    public readonly lastName: LastName,
    public readonly age: Age,
    ) {
    super();
    }
    }

    const p1 = new Person(new FirstName('John'), new LastName('Smith'), new Age(42)),
    p2 = new Person(new FirstName('John'), new LastName('Smith'), new Age(42));

    p1.equals(p2) === true

    Parameters

    • externalanother: TinyType

    Returns boolean

[custom]

  • [custom](): string
  • Returns string

toString

  • toString(): string
  • Returns string

toJSON

  • toJSON(): JSONValue
  • Returns JSONValue