MCPcopy Create free account
hub / github.com/Effect-TS/effect / f

Function f

packages/effect/test/Config.test.ts:233–240  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

231 it("mapOrFail supports effectful validation", async () => {
232 const config = Config.schema(Schema.String)
233 const f = (s: string) =>
234 s === ""
235 ? Effect.fail(
236 new Config.ConfigError(
237 new Schema.SchemaError(new SchemaIssue.InvalidValue({ message: "empty" }))
238 )
239 )
240 : Effect.succeed(s.toUpperCase())
241
242 await assertSuccess(
243 Config.mapOrFail(config, f),

Callers

nothing calls this directly

Calls 2

failMethod · 0.45
succeedMethod · 0.45

Tested by

no test coverage detected