Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cats-effect to 3.0.1 #117

Merged
merged 2 commits into from
Apr 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ lazy val cats = CrossProject("desert-cats", file("desert-cats"))(JVMPlatform, JS
description := "Desert serializers for cats data types",
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % "2.5.0",
"dev.zio" %% "zio-interop-cats" % "2.1.4.0" % Test
"dev.zio" %% "zio-interop-cats" % "2.4.0.0" % Test
)
)
.jsSettings(coverageEnabled := false)
Expand All @@ -106,8 +106,7 @@ lazy val catsEffect = CrossProject("desert-cats-effect", file("desert-cats-effec
.settings(
description := "Cats-effect API bindings for desert",
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % "2.4.1",
"dev.zio" %% "zio-interop-cats" % "2.4.0.0" % Test
"org.typelevel" %% "cats-effect" % "3.0.1",
)
)
.jsSettings(coverageEnabled := false)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.github.vigoo.desert.catseffect

import cats.effect.IO
import io.github.vigoo.desert.catseffect.syntax._
import io.github.vigoo.desert.codecs._
import zio.Task
import zio.interop.catz._
import zio.ZIO
import zio.test.Assertion._
import zio.test._
import zio.test.environment._
Expand All @@ -12,10 +12,15 @@ object IOWrapperSpec extends DefaultRunnableSpec {
override def spec: ZSpec[TestEnvironment, Throwable] =
suite("Cats effect syntax")(
testM("is an IO wrapper around the core functionality") {
for {
bytes <- serializeToArray[Task, String]("Hello world")
deser <- deserializeFromArray[Task, String](bytes)
} yield assert(deser)(equalTo("Hello world"))
ZIO.effect {
val test = for {
bytes <- serializeToArray[IO, String]("Hello world")
deser <- deserializeFromArray[IO, String](bytes)
} yield assert(deser)(equalTo("Hello world"))

import cats.effect.unsafe.implicits.global
test.unsafeRunSync()
}
}
)
}