Closed loicdescotte closed 6 years ago
Work in progress, not ready to merge
You should check if monad laws are validated : https://github.com/DanielaSfregola/tutorial-cat/blob/master/src/test/scala/com/danielasfregola/tutorial/cat/monad/MonadSpec.scala
Not working currently on scala.js :
java.lang.IllegalStateException: Queue is empty while future is not completed, this means you're probably using a wrong ExecutionContext for your task, please double check your Future.
at $c_jl_IllegalStateException.$c_jl_Throwable.fillInStackTrace__jl_Throwable(/mnt/c/Users/loicd/dev/hamsters/js/target/scala-2.11/hamsters-test-fastopt.js:30145:14)
at $c_jl_IllegalStateException.$c_jl_Throwable.init___T__jl_Throwable(/mnt/c/Users/loicd/dev/hamsters/js/target/scala-2.11/hamsters-test-fastopt.js:30167:8)
at java.lang.IllegalStateException.<init>(/mnt/c/Users/loicd/dev/hamsters/js/target/scala-2.11/hamsters-test-fastopt.js:53065:52)
at org.scalatest.concurrent.SerialExecutionContext.recRunNow(/mnt/c/Users/loicd/dev/hamsters/js/target/scala-2.11/hamsters-test-fastopt.js:28329:49)
at org.scalatest.AsyncFlatSpecLike$class.runTest(/mnt/c/Users/loicd/dev/hamsters/js/target/scala-2.11/hamsters-test-fastopt.js:1728:10)
at {anonymous}()(/mnt/c/Users/loicd/dev/hamsters/js/target/scala-2.11/hamsters-test-fastopt.js:1483:14)
at scala.scalajs.runtime.AnonFunction2.apply(/mnt/c/Users/loicd/dev/hamsters/js/target/scala-2.11/hamsters-test-fastopt.js:38898:23)
at {anonymous}()(/mnt/c/Users/loicd/dev/hamsters/js/target/scala-2.11/hamsters-test-fastopt.js:50632:72)
at scala.scalajs.runtime.AnonFunction0.apply(/mnt/c/Users/loicd/dev/hamsters/js/target/scala-2.11/hamsters-test-fastopt.js:38838:23)
at org.scalatest.Status$$anonfun$thenRun$1.apply(/mnt/c/Users/loicd/dev/hamsters/js/target/scala-2.11/hamsters-test-fastopt.js:51187:60)
The issue on js may be due to the fact that the execution context is not overridable in the Monad[Future] instance.
Fixed, problem was due to hardcoded execution context in future monad instance + scalatest default ec
EitherT and FutureEither done We just need to make the scalacheck tests work
Fixes https://github.com/scala-hamsters/hamsters/issues/17
Still to do :