Skip to content

Commit

Permalink
Additional test
Browse files Browse the repository at this point in the history
  • Loading branch information
durban committed Nov 10, 2024
1 parent 67ea6cc commit 4e70088
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/shared/src/test/scala/dev/tauri/choam/RxnSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,15 @@ trait RxnSpec[F[_]] extends BaseSpecAsyncF[F] { this: McasImplSpec =>
r.apply[F](null).attemptNarrow[MyException].flatMap(e => assertF(e.isLeft))
}
}

test("STM API shouldn't leak (too much) from Rxn") {
import core.Txn
import Rxn.Anything
val rxn: Axn[String] = Rxn.pure("foo")
val txn: Txn[Anything, String] = rxn
val flatMapped = rxn.flatMap(_ => txn)
flatMapped : Txn[Anything, String]
}
}

private[choam] object RxnSpec {
Expand Down

0 comments on commit 4e70088

Please sign in to comment.