MCPcopy Create free account
hub / github.com/denoland/std / fail

Function fail

assert/fail.ts:18–21  ·  view source on GitHub ↗
(msg?: string)

Source from the content-addressed store, hash-verified

16 * @returns Never returns, always throws.
17 */
18export function fail(msg?: string): never {
19 const msgSuffix = msg ? `: ${msg}` : ".";
20 throw new AssertionError(`Failed assertion${msgSuffix}`);
21}

Callers 5

crypto_test.tsFile · 0.90
fail_test.tsFile · 0.90
throws_test.tsFile · 0.90
testFailedAssertionFunction · 0.90
snapshot_test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected