zunit icon indicating copy to clipboard operation
zunit copied to clipboard

Allow for catching expected exceptions within tests

Open molovo opened this issue 7 years ago • 0 comments

If we integrate crash as described in #50, we could allow users to mark tests as expecting a certain exception or exit code, and mark the test as passed if the exception occurs.

Syntax:

@test 'My awesome test' {
  @expect AnException
  
  # Test code here...
}

molovo avatar Mar 02 '17 08:03 molovo