Skip to main content

Discardable

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 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

discard

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


    Returns void | Promise<void>