MCPcopy Index your code
hub / github.com/Effect-TS/effect / fail

Function fail

packages/effect/test/Schema/SchemaTest.ts:79–86  ·  view source on GitHub ↗

* Ensures that the given constructor throws the expected error.

(
        // Destructure to verify that "this" type is bound
        { make }: { readonly make: (a: A) => B },
        input: A,
        message: string
      )

Source from the content-addressed store, hash-verified

77 * Ensures that the given constructor throws the expected error.
78 */
79 fail<const A, const B>(
80 // Destructure to verify that "this" type is bound
81 { make }: { readonly make: (a: A) => B },
82 input: A,
83 message: string
84 ) {
85 out.parseError(() => make(input), message)
86 }
87 },
88
89 arbitrary: {

Callers 4

assertInstanceOfFunction · 0.70
rightFunction · 0.70
leftFunction · 0.70

Calls 4

eitherMethod · 0.80
failMethod · 0.65
makeFunction · 0.50
deepStrictEqualFunction · 0.50

Tested by

no test coverage detected