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

Function expectMatch

packages/effect/test/Cause.test.ts:896–908  ·  view source on GitHub ↗
(cause: Cause.Cause<E>, expected: string)

Source from the content-addressed store, hash-verified

894 describe("Matching", () => {
895 it("match", () => {
896 const expectMatch = <E>(cause: Cause.Cause<E>, expected: string) => {
897 strictEqual(
898 Cause.match(cause, {
899 onEmpty: "Empty",
900 onFail: () => "Fail",
901 onDie: () => "Die",
902 onInterrupt: () => "Interrupt",
903 onSequential: () => "Sequential",
904 onParallel: () => "Parallel"
905 }),
906 expected
907 )
908 }
909 expectMatch(empty, "Empty")
910 expectMatch(failure, "Fail")
911 expectMatch(defect, "Die")

Callers 1

Cause.test.tsFile · 0.85

Calls 1

strictEqualFunction · 0.90

Tested by

no test coverage detected