import {AssertionError} from '@serenity-js/core/lib/errors'
public class | source

AssertionError

Thrown to indicate that an assertion has failed.

Extends:

ErrorRuntimeError → AssertionError

Constructor Summary

Public Constructor
public

constructor(message: string, expected: any, actual: any, cause: Error)

Inherited Summary

From class RuntimeError
public

name: *

public

stack: string

public

toString(): string

Human-readable description

Public Constructors

public constructor(message: string, expected: any, actual: any, cause: Error) source

Params:

NameTypeAttributeDescription
message string

Human-readable description of the error

expected any

The value that was expected

actual any

The value that was received instead of the expected one

cause Error
  • optional

The root cause of this RuntimeError, if any