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

Function assertSomeBigDecimal

packages/effect/test/BigDecimal.test.ts:16–21  ·  view source on GitHub ↗
(option: Option.Option<BigDecimal.BigDecimal>, expected: BigDecimal.BigDecimal)

Source from the content-addressed store, hash-verified

14const $ = BigDecimal.fromStringUnsafe
15
16const assertSomeBigDecimal = (option: Option.Option<BigDecimal.BigDecimal>, expected: BigDecimal.BigDecimal) => {
17 if (Option.isNone(option)) {
18 throw new Error("Expected Option.some")
19 }
20 assertEquals(option.value, expected)
21}
22
23const assertDivide = (x: string, y: string, z: string) => {
24 assertSomeBigDecimal(BigDecimal.divide($(x), $(y)), $(z))

Callers 2

assertDivideFunction · 0.85
BigDecimal.test.tsFile · 0.85

Calls 1

assertEqualsFunction · 0.90

Tested by

no test coverage detected