Last active
February 3, 2026 20:19
-
-
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/a014a7058d91804f2af001dbe5900bc09d0ba521
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // summary : ZIO learning - zio tests filtering | |
| // keywords : scala, scalacli, zio, ziotest, @testable | |
| // publish : gist | |
| // authors : David Crosson | |
| // license : Apache License Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) | |
| // 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.4.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