Allows done functions for test cases to take a failure reason to indicate a failure asynchronously.