forked from nova/jmonkey-test
32 lines
790 B
Scala
32 lines
790 B
Scala
package wow.doge.mygame
|
|
|
|
import cats.syntax.eq._
|
|
import io.circe.Printer
|
|
import monix.bio.UIO
|
|
import org.scalatest.funsuite.AnyFunSuite
|
|
import wow.doge.mygame.subsystems.moddingsystem.ModdingSystem
|
|
import monix.bio.Task
|
|
import scala.concurrent.Future
|
|
import monix.execution.Scheduler
|
|
|
|
class ModdingSystemTest extends munit.TaglessFinalSuite[Task] {
|
|
|
|
override protected def toFuture[A](f: Task[A]): Future[A] = {
|
|
implicit val s = Scheduler.global
|
|
f.runToFuture
|
|
}
|
|
val printer = Printer.spaces2
|
|
test("main") {
|
|
val io = for {
|
|
res <- ModdingSystem.run()
|
|
_ <- UIO(
|
|
assert(
|
|
(res.parseSuccesses.length + res.parseFailures.length) eqv res.readSuccesses.length
|
|
)
|
|
)
|
|
_ <- ModdingSystem.log(res)
|
|
} yield res
|
|
io.attempt
|
|
}
|
|
}
|