ZIO Test: Add new spec type
See original GitHub issueTo provide a more “flat” style and without any commas, it would be nice to define a mutable spec, supporting the following syntax:
object MySpec extends MutableRunnableSpec {
suite("foo") {
testM("name") {
} @@ ignore
test("name 2") {
suite("another suite") {
}
}
}
}
This would be accomplished by defining suite
and test
and testM
methods directly inside MutableRunnableSpec
, which would mutably append to a data structure, which would be materialized when the def spec
of the parent runnable spec is called.
In order to support annotations, the test
and suite
methods would have to return some object with @@
side-effect method, which modifies in-place the last definition by applying the test aspect.
The goal would be to preserve the existing ZIO Test syntax and feature set almost exactly, while at the same time getting away from the “comma” syntax which many find annoying.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Get started with ZIO Test - Medium
ZIO Test is a zero dependency Scala library for testing. It works very well using ZIO because ZIO Test provides the ability to...
Read more >Spec | ZIO
Just like the ZIO data type, the Spec requires an environment of type R . When we write tests, we might need to...
Read more >Effective testing with ZIO Test - Pavels Sisojevs
To start, we import zio.test package. It contains ZIO Test building blocks. We extend DefaultRunnableSpec trait which is similar to zio.App - it ......
Read more >Working with shared dependencies in ZIO Test - In Absentia
In ZIO Test, it's common to refer to suites of tests as Specs, here we extend DefaultRunnableSpec which is responsible for several things....
Read more >How to Test Effects in ZIO | An Introduction to ZIO Test
Each collection of tests is represented as a spec that can either be a test or a suite containing one or more other...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will take this
Also I think this issue can be closed?