utest icon indicating copy to clipboard operation
utest copied to clipboard

disabled test (feature request)

Open k0ala opened this issue 3 years ago • 0 comments

It would be great to have a way to disable a test, rather than commenting it out. A disabled test would still show up in the output. Let's say I have the following suite:

val tests = Tests {
  test("always succeds") {
    true ==> true
  }
  test("always fails") {
    true ==> false
  }
  disabled("fails at the moment") {
    true ==> false
  }
}

This would yield the following

+ my.package.suite.always succeds 3ms  
- my.package.suite.fails at the moment DISABLED
X my.package.suite.always fails 0ms 
  java.lang.AssertionError: assertion failed: ==> assertion failed: true != false
    scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
    utest.asserts.Asserts$ArrowAssert.$eq$eq$greater(Asserts.scala:90)
    my.package.suite$.$init$$$anonfun$7$$anonfun$6(suite.scala:29)

k0ala avatar Oct 05 '21 13:10 k0ala