An interface to be implemented by any Ability that needs to free up the resources it uses, e.g. disconnect from a database.
- when SceneFinishes, for actors instantiated after SceneStarts - e.g. within a test scenario or in a “before each” hook
- when TestRunFinishes, for actors instantiated before SceneStarts - e.g. in a “before all” hook
Note that events such as SceneFinishes and TestRunFinishes are emitted by Serenity/JS test runner adapters,
@serenity-js/jasmine, and so on.
Consult their respective readmes to learn how to register them with your test runner of choice.
Discards the resources associated with this ability.
Returns void | Promise<void>