ErrorSerialiser
Tests:
- ErrorSerialiser when serialising errors to JSON works with Error objects
- ErrorSerialiser when serialising errors to JSON serialises all fields of custom objects that extend Error
- ErrorSerialiser when serialising errors to JSON serialises all fields of a Node.js AssertionError
- ErrorSerialiser when deserialising errors from JSON deserialises an Error
- ErrorSerialiser when deserialising errors from JSON deserialises a custom AssertionError to Serenity/JS AssertionError, including all its fields
- ErrorSerialiser when deserialising errors from JSON deserialises Node.js AssertionError as Serenity/JS AssertionError
- ErrorSerialiser when deserialising errors from stack trace works with standard Error objects (Cucumber event protocol)
- ErrorSerialiser when deserialising errors from stack trace instantiates an Error object from a string (Cucumber event protocol)
- ErrorSerialiser when deserialising errors from stack trace instantiates a Serenity/JS AssertionError from an AssertionError-like stack trace, as well as it can
Static Method Summary
Static Public Methods | ||
public static |
deserialise(stringifiedError: string): E |
|
public static |
deserialiseFromStackTrace(stack: string): Error |
|
public static |
serialise(error: Error): string |
Static Public Methods
public static deserialise(stringifiedError: string): E source
Params:
Name | Type | Attribute | Description |
stringifiedError | string |
Returns:
E |
public static deserialiseFromStackTrace(stack: string): Error source
Params:
Name | Type | Attribute | Description |
stack | string |
Returns:
Error |
public static serialise(error: Error): string source
Params:
Name | Type | Attribute | Description |
error | Error |
Returns:
string |