TestCompromisedError
Thrown to indicate that the test can't be performed due to an issue with a downstream dependency. For example, it makes no sense to run a full-stack integration test if we already know that the database server is down.
Extends:
Error → RuntimeError → TestCompromisedError
Examples:
Throwing a TestCompromisedError from a custom Interaction
import { Interaction } from '@serenity-js/core';
const SetUpTestDatabase = () =>
Interaction.where(`#actor sets up a test database`, actor => {
return SomeCustomDatabaseSpecificAbility.as(actor).setUpTestDatabase().catch(error => {
throw new TestCompromisedError('Could not set up the test database', error);
});
});
Constructor Summary
Public Constructor | ||
public |
constructor(message: string, cause: Error) |
Inherited Summary
From class RuntimeError | ||
public |
name: * |
|
public |
stack: string |
|
public |
toString(): string Human-readable description |
Public Constructors
public constructor(message: string, cause: Error) source
Override:
RuntimeError#constructorParams:
Name | Type | Attribute | Description |
message | string | Human-readable description of the error |
|
cause | Error |
|
The root cause of this RuntimeError, if any |