Last active
May 25, 2024 10: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/599dcfe07770ca531bf8860979f78250ff6220f4
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 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.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