(cause: Cause.Cause<E>, expected: string)
| 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") |
no test coverage detected