Remix
Remix
remix/assert · FunctionView Source

doesNotReject

Summary

Asserts that the promise returned by fn does not reject.

Signature

function doesNotReject(fn: () => Promise<any>, message: string): Promise<void>;

Example

await assert.doesNotReject(() => fetch("/healthy"));

Parameters

fn

A function returning a promise.

message

Optional failure message.