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

Function assertFailure

packages/effect/test/Brand.test.ts:18–24  ·  view source on GitHub ↗
(
  ctor: Brand.Constructor<T>,
  value: Brand.Brand.Unbranded<T>,
  message: string
)

Source from the content-addressed store, hash-verified

16}
17
18function assertFailure<T extends Brand.Brand<any>>(
19 ctor: Brand.Constructor<T>,
20 value: Brand.Brand.Unbranded<T>,
21 message: string
22) {
23 vassertFailure(ctor.result(value).pipe(Result.mapError((e) => e.message)), message)
24}
25
26describe("Brand", () => {
27 it("formats validation failures as BrandError", () => {

Callers 2

Result.test.tsFile · 0.90
Stream.test.tsFile · 0.90

Calls 2

pipeMethod · 0.65
resultMethod · 0.65

Tested by

no test coverage detected