qunit: Improve testrunner logging for pending ajax
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 15 Apr 2017 00:12:06 +0000 (17:12 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Sat, 15 Apr 2017 00:23:16 +0000 (17:23 -0700)
commitd8af25c706ac5b3b18bccbf76f8669c5b73764c9
treeff33ddf1cae7c8830597faa0fb3c16f60a9ba317
parentdc17c8ddbf2a51d0061698d1cde9f17136ff0444
qunit: Improve testrunner logging for pending ajax

* Move `restoreWarnings()` in tearDown() to the mirrored location
  of related code in setUp().

* Ensure that accidentally calling `suppressWarnings()` twice will
  not wipe out the original reference indefinitely. If it was
  already set, subsequent calls should do nothing instead of
  overwriting them again so that recovery is still possible.

* Log all ajax requests logged during the test, not just the
  one currently still pending. This should avoid situations
  where we throw "Pending ajax requests" but no information
  is logged about which requests those might be.

Change-Id: I900ad98c4c8520bdd6ae00a24ac82272f3becfee
tests/qunit/data/testrunner.js