See changelog.
2.13
, JS + JVM3.0.1
, JS + JVM
-
"com.busymachines" %% s"pureharm-testkit" % "0.4.0"
(for cats-effect 3). Which has these as its main dependencies:- munit
0.7.23
- log4cats-core
1.3.1
- pureharm-core-anomaly
0.3.0
- pureharm-core-sprout
0.3.0
- pureharm-effects-cats
0.5.0
- munit
-
"com.busymachines" %% s"pureharm-testkit-ce2" % "0.4.0"
(for cats-effect 2). Which has these as its main dependencies:- munit
0.7.23
- log4cats-core
2.1.1
- pureharm-core-anomaly
0.3.0
- pureharm-core-sprout
0.3.0
- pureharm-effects-cats
0.5.0
- munit
If you are on sbt versions lower than 1.5.0
, then follow the munit setup to add the appropriate test framework to your build.
testFrameworks += new TestFramework("munit.Framework")
Create your own "testkit" package. And use that everywhere.
package myapp
import busymachines.pureharm.testkit
package object test extends testkit.PureharmTestkitAliases
//-------- EOF --------
package myapp.test
/**
* Add any custom assertions, flavors, styles, opiniated decisions
* here, and continue using this.
*/
abstract class MyAppTest extends testkit.PureharmTestkit
//-------- EOF --------
package myapp.somemodule
import myapp.test._
final class MyTest extends MyAppTest {
test("no resource")(IO.unit)
private val myResource =
ResourceFixture((to: TestOptions) => Resource.eval(testLogger.info(s"Making: $to") >> Timer[IO].sleep(10.millis)))
myResource.test(TestOptions("with resource").tag(Slow))((_: Unit) => testLogger.info("Executing test w/ resource"))
}
Still under construction. See release notes and tests for examples.
All code is available to you under the Apache 2.0 license, available at http://www.apache.org/licenses/LICENSE-2.0 and also in the LICENSE file.