fail

View Source

Summary

Unconditionally fails the test with an optional message.

Signature

function fail(message: string): never;

Example

assert.fail('this branch should never be reached')

Params

message

Optional failure message.