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

Function expectRight

packages/effect/test/Effect/do-notation.test.ts:9–11  ·  view source on GitHub ↗
(e: Effect.Effect<R, L>, expected: R)

Source from the content-addressed store, hash-verified

7import type { NoExcessProperties } from "effect/Types"
8
9const expectRight = <R, L>(e: Effect.Effect<R, L>, expected: R) => {
10 Util.deepStrictEqual(Effect.runSync(Effect.either(e)), Either.right(expected))
11}
12
13const expectLeft = <R, L>(e: Effect.Effect<R, L>, expected: L) => {
14 Util.deepStrictEqual(Effect.runSync(Effect.either(e)), Either.left(expected))

Callers 1

Calls 1

eitherMethod · 0.80

Tested by

no test coverage detected