FailureGenerator

FailureGenerator

I report failures to the test runner. The type of failures I report are not from failed assertions, but user explicit requests for failures.

Constructor

new FailureGenerator()

Source:

Methods

with(description) → {void}

Makes the current test to explicitly fail, indicating an exceptional scenario.

Source:
Parameters:
Name Type Description
description string

A reason to explain why we are explicitly failing.

Returns:
Type:
void
Example
fail.with('The code should not reach this point')