Closed Aboisier closed 5 years ago
The error message for timed out tests is undefined.
When a test is started, a timeout is also started concurrently.
setTimeout(() => reject('Test has timed out.'), timeout);
When this error is caught, the error is a string and not an error. The problem is that the error message is set like this by the test runner:
report = new FailedTestReport(test.name, err.message, 0);
We should check whether the error is a string or an object.
The following test will also fail with an undefined error message:
@Test() async test() { await new Promise((resolve, reject) => reject('Failure!')); }
Fixed in #20
The error message for timed out tests is undefined.
When a test is started, a timeout is also started concurrently.
When this error is caught, the error is a string and not an error. The problem is that the error message is set like this by the test runner:
We should check whether the error is a string or an object.
The following test will also fail with an undefined error message: