Suite • opensavvy.prepared.suite.config • Ignored • If
If¶
inline fun If(predicate: () -> Boolean): TestConfig
Marks this test or an entire suite as disabled if predicate returns true.
If predicate returns false, does nothing.
Example¶
Mark a suite as disabled:
Mark a test as disabled:
Use-case¶
Conceptually, marking a test as ignored:
is similar to not declaring the test at all:
However, some test runners (e.g., TestBalloon) refuse to execute suites that are declared without any tests. Declaring tests as conditionally ignored avoids this issue.