Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active May 6, 2023 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dacr/bfd27c09f527c2d1922be2d5028ae0f3 to your computer and use it in GitHub Desktop.
Save dacr/bfd27c09f527c2d1922be2d5028ae0f3 to your computer and use it in GitHub Desktop.
ZIO learning - zio tests filtering / published by https://github.com/dacr/code-examples-manager #d923a94a-4ce7-4ca4-a403-720904b10e5b/651167f4f0822c8a36e65cc09abe13654da908a8
// summary : ZIO learning - zio tests filtering
// keywords : scala, scalacli, zio, ziotest, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : d923a94a-4ce7-4ca4-a403-720904b10e5b
// created-on : 2022-11-08T10:18:46+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
// ---------------------
//> using scala "3.2.2"
//> using dep "dev.zio::zio-test:2.0.13"
// ---------------------
import zio.*
import zio.test.*
import zio.test.Assertion.*
import zio.test.TestAspect.*
object FilteredTests extends ZIOSpecDefault {
def spec = suite("some suite")(
test("debug test")(assertTrue(true)) @@ tag("debug"),
test("some test")(assertTrue(true)),
suite("another suite")(
test("some other debug test")(assertTrue(true)) @@ tag("debug"),
test("again another test")(assertTrue(true))
)
)
}
//FilteredTests.main(Array("-tags", "debug")) // commented because there's an exit
FilteredTests.main(Array("-t", "again"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment