Skip to content

Commit

Permalink
Apply nice suggestion by @gcanti
Browse files Browse the repository at this point in the history
  • Loading branch information
kutyel committed Oct 9, 2023
1 parent d3754c9 commit f9a9df2
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions test/Effect/applicative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ describe.concurrent("Effect", () => {
Effect.gen(function*($) {
const result = yield* $(
Effect.succeed(add).pipe(Effect.ap(Effect.succeed(1)), Effect.ap(Effect.fail("c"))),
Effect.match({
onFailure: Either.left,
onSuccess: Either.right
})
Effect.either
)
assert.deepStrictEqual(result, Either.left("c"))
}))
Expand All @@ -28,10 +25,7 @@ describe.concurrent("Effect", () => {
Effect.gen(function*($) {
const result = yield* $(
Effect.succeed(add).pipe(Effect.ap(Effect.fail("b")), Effect.ap(Effect.fail("c"))),
Effect.match({
onFailure: Either.left,
onSuccess: Either.right
})
Effect.either
)
assert.deepStrictEqual(result, Either.left("b"))
}))
Expand All @@ -43,10 +37,7 @@ describe.concurrent("Effect", () => {
Effect.ap(Effect.succeed(1)),
Effect.ap(Effect.succeed(2))
),
Effect.match({
onFailure: Either.left,
onSuccess: Either.right
})
Effect.either
)
assert.deepStrictEqual(result, Either.left("a"))
}))
Expand Down

0 comments on commit f9a9df2

Please sign in to comment.