Skip to main content

externalDiscardable

An interface to be implemented by any Ability that needs to free up the resources it uses, e.g. disconnect from a database.

This Discardable.discard method is invoked directly by the actor, and indirectly by the stage:

Note that events such as SceneFinishes and TestRunFinishes are emitted by Serenity/JS test runner adapters, such as @serenity-js/cucumber, @serenity-js/mocha, @serenity-js/jasmine, and so on. Consult their respective readmes to learn how to register them with your test runner of choice.

Learn more

Implemented by

Index

Methods

Methods

externaldiscard

  • discard(): void | Promise<void>
  • Discards the resources associated with this ability.


    Returns void | Promise<void>