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

Function right

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

* Verifies that the either is a `Right` with the expected value.

(either: Either.Either<R, L>, right: R)

Source from the content-addressed store, hash-verified

284 * Verifies that the either is a `Right` with the expected value.
285 */
286 right<const R, L>(either: Either.Either<R, L>, right: R) {
287 if (Either.isRight(either)) {
288 deepStrictEqual(either.right, right)
289 } else {
290 // eslint-disable-next-line no-console
291 console.log(either.left)
292 fail(`expected a Right, got a Left: ${either.left}`)
293 }
294 },
295
296 /**
297 * Verifies that the either is a `Left` with the expected value.

Callers

nothing calls this directly

Calls 3

failFunction · 0.70
logMethod · 0.65
deepStrictEqualFunction · 0.50

Tested by

no test coverage detected