MCPcopy
hub / github.com/Effect-TS/effect / assertSome

Function assertSome

packages/vitest/src/utils.ts:197–203  ·  view source on GitHub ↗
(
  option: Option.Option<A>,
  expected: A,
  ..._: Array<never>
)

Source from the content-addressed store, hash-verified

195 * @since 0.21.0
196 */
197export function assertSome<A>(
198 option: Option.Option<A>,
199 expected: A,
200 ..._: Array<never>
201): asserts option is Option.Some<A> {
202 deepStrictEqual(option, Option.some(expected))
203}
204
205// ----------------------------
206// Either

Callers 15

testLayerFunction · 0.90
Iterable.test.tsFile · 0.90
Record.test.tsFile · 0.90
Either.test.tsFile · 0.90
Number.test.tsFile · 0.90
Option.test.tsFile · 0.90
assertSomeIsoFunction · 0.90
Chunk.test.tsFile · 0.90
TArray.test.tsFile · 0.90

Calls 1

deepStrictEqualFunction · 0.70

Tested by 2

testLayerFunction · 0.72
assertSomeIsoFunction · 0.72