MCPcopy Create free account
hub / github.com/effect-app/libs / assert

Function assert

repos/effect/packages/effect/src/Console.ts:117–122  ·  view source on GitHub ↗
(condition: boolean, ...args: ReadonlyArray<any>)

Source from the content-addressed store, hash-verified

115/**
116 * Writes the supplied assertion message to the console as an error when `condition` is false; when `condition` is true, no console output is produced.
117 *
118 * **Example** (Logging failed assertions)
119 *
120 * ```ts import.meta.vitest
121 * import { Console, Effect } from "effect"
122 *
123 * const errors: Array<unknown> = []
124 * const testConsole: Console.Console = Object.assign(Object.create(console), {
125 * assert: (condition: boolean, ...args: ReadonlyArray<unknown>) => {

Calls 3

consoleWithFunction · 0.85
syncMethod · 0.80
assertMethod · 0.80

Tested by 5

requestPayloadIdFunction · 0.68
runSuiteFunction · 0.68
spanFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…