mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Log suite start failures in the test runner
This commit is contained in:
parent
c19d76f9b8
commit
662ac5548f
1 changed files with 15 additions and 1 deletions
|
@ -51,7 +51,21 @@ var TestReporter = function (browser) {
|
|||
sendInfo("Started tests for " + browser + ".");
|
||||
};
|
||||
|
||||
this.suiteStarted = function (result) {};
|
||||
this.suiteStarted = function (result) {
|
||||
// Normally suite starts don't have to be reported because the individual
|
||||
// specs inside them are reported, but it can happen that the suite cannot
|
||||
// start, for instance due to an uncaught exception in `beforeEach`. This
|
||||
// is problematic because the specs inside the suite will never be found
|
||||
// and run, so if we don't report the suite start failure here it would be
|
||||
// ignored silently, leading to passing tests even though some did not run.
|
||||
if (result.failedExpectations.length > 0) {
|
||||
let failedMessages = "";
|
||||
for (const item of result.failedExpectations) {
|
||||
failedMessages += `${item.message} `;
|
||||
}
|
||||
sendResult("TEST-UNEXPECTED-FAIL", result.description, failedMessages);
|
||||
}
|
||||
};
|
||||
|
||||
this.specStarted = function (result) {};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue