Tagging
Weaver provides some constructs to dynamically tag tests as ignored
:
import weaver._
import cats.effect.IO
import cats.syntax.all._
object TaggingSuite extends SimpleIOSuite {
test("Only on CI") {
for {
onCI <- IO(sys.env.get("CI").isDefined)
_ <- ignore("not on CI").unlessA(onCI)
x <- IO.delay(1)
y <- IO.delay(2)
} yield expect(x == y)
}
}
repl.MdocSessionMdocAppTaggingSuite - Only on CI 8ms *************FAILURES************* repl.MdocSessionMdocAppTaggingSuite - Only on CI 8ms
assertion failed (tagging.md:25)
expect(x == y)
Use the `clue` function to troubleshoot
tagging.md:25
} yield expect(x == y)
^ Total 1, Failed 1, Passed 0, Ignored 0