Skip to main content

externalabstractActivity

Hierarchy

Index

Constructors

externalconstructor

  • Parameters

    • externaldescription: Answerable<string>
    • externallocation: FileSystemLocation = ...

    Returns Activity

Methods

staticexternal[hasInstance]

  • [hasInstance](instance: unknown): boolean
  • Custom instanceof check that recognises activities created by another copy of @serenity-js/core.

    This addresses the dual-package hazard, where the same class loaded from both the CJS and ESM builds results in two distinct constructor functions. For example, Navigate loaded via require('@serenity-js/web') extends the CJS Interaction, while the actor performing it might have been created by the ESM build.

    Checks against Activity, Interaction and Task match any instance whose prototype chain contains a class with the same brand. Checks against any other subclasses retain the native instanceof semantics.

    See https://github.com/serenity-js/serenity-js/issues/3535


    Parameters

    • externalinstance: unknown

    Returns boolean

externalinstantiationLocation

  • instantiationLocation(): FileSystemLocation
  • Returns the location where this Activity was instantiated.


    Returns FileSystemLocation

externalabstractperformAs

externaldescribedBy

  • Resolves the description of this object in the context of the provided actor.


    Parameters

    Returns Promise<string>

externaltoString

  • toString(): string
  • Returns a human-readable description of this object.


    Returns string