Skip to content

Commit

Permalink
HTML Reporter: Fix display: none regression on global error message
Browse files Browse the repository at this point in the history
Follows-up 8f5e7ed, which fixed the bug where in the "No tests" error
(or indeed any global error after tests are done running) could cause
the test runner to get stuck.

That change maintained backward compatibility by continuing to count
these global errors as "failed tests", so that CI reporters listening
for `QUnit.done()` on `QUnit.on("runEnd")` continue to get the same
negative signal. And, it continued to visually render them as a failed
test if they happen during test execution or as the last/only event.

But... it inserted the element into the DOM without making visible,
which fooled our internal unit tests.

Fix #1651.
  • Loading branch information
Krinkle committed Sep 9, 2021
1 parent efeafcb commit 4853df6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/html-reporter/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,9 @@ export function escapeText( s ) {
assertLi.className = "fail";
assertLi.innerHTML = message;
assertList.appendChild( assertLi );

// Make it visible
testItem.className = "fail";
} );

// Avoid readyState issue with phantomjs
Expand Down

0 comments on commit 4853df6

Please sign in to comment.