[英]How to ignore a Suite or a Test in ZIO Test?
I could not find anything on how to ignore a Suite or a Test with ZIO Test.我找不到有关如何使用 ZIO 测试忽略套件或测试的任何信息。
Whether in an example nor in the documentation ( https://zio.dev/docs/usecases/usecases_testing )无论是在示例中还是在文档中( https://zio.dev/docs/usecases/usecases_testing )
There is an ignored
in the test package object
: test package object
有一个ignored
的test package object
:
/**
* Creates an ignored test result.
*/
final val ignored: ZTest[Any, Nothing, Nothing] =
ZIO.succeed(TestSuccess.Ignored)
But how can it be used in your code?但是如何在您的代码中使用它呢?
I tried different things, but with no success.我尝试了不同的东西,但没有成功。
The best way to ignore a test is using TestAspect.ignore
.忽略测试的最佳方法是使用TestAspect.ignore
。 For example:例如:
test("A test that would otherwise fail") {
assert(true, isFalse)
} @@ ignore
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.