Function toStatus

The status of a test that ended by throwing throwable, or null when it did not throw

TestResult.Status toStatus(
  object.Throwable throwable
);

Example

toStatus returns success when nothing was thrown

toStatus(null).should.equal(TestResult.Status.success);

Example

toStatus returns pending for a PendingTestException

toStatus(new PendingTestException).should.equal(TestResult.Status.pending);

Example

toStatus returns failure for an Exception

toStatus(new Exception("boom")).should.equal(TestResult.Status.failure);