Skip to main content

externalSceneFinishes

Emitted by a Serenity/JS test runner adapter, right before a test and all its associated test hooks finish. Triggers any clean-up operations that might be required, such as discarding of the discardable abilities.

The outcome property contains the test outcome determined so far, before any cleanup operations. This allows stage crew members like the WebdriverIO notifier to invoke hooks with the test result before waitForNextCue() is called.

Hierarchy

Index

Constructors

externalconstructor

  • Parameters

    • externalsceneId: CorrelationId
    • externaloutcome: Outcome
    • externaloptionaltimestamp: Timestamp

    Returns SceneFinishes

Properties

publicexternalreadonlytimestamp

timestamp: Timestamp = ...

publicexternalreadonlysceneId

sceneId: CorrelationId

publicexternalreadonlyoutcome

outcome: Outcome

Methods

staticexternalfromJSON

externalequals

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

    Compares two tiny types by value

    @example
    class Id extends TinyTypeOf<string>() {}

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

    id.equals(id) === true
    @example
    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

externaltoString

  • toString(): string
  • @desc

    Serialises the object to its string representation


    Returns string

externaltoJSON

  • toJSON(): JSONValue
  • @desc

    Serialises the object to a JSON representation.

    @example
    class FirstName extends TinyTypeOf<string>() {}

    const name = new FirstName('Jan');

    name.toJSON() === 'Jan'
    @example
    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 person = new Person(new FirstName('John'), new LastName('Smith'), new Age(42)),

    person.toJSON() === { firstName: 'John', lastName: 'Smith', age: 42 }

    Returns JSONValue