(bug 37390) Clean up QUnit test suites
* Use new QUnit 1.8.0+ pattern:
- no-globals (only QUnit itself)
- assert-object pattern
- Remove pointless '-- Initial check' assertions.
I introduced this pattern last year for no particular reason and
everybody just copied it. There is no reason for it, it works fine
without it. And the rest of the world that uses QUnit doesn't do
it either. Exceptions are caught by QUnit and error handling there
is much better than a dull '!ok()' assertion.
* .jshintrc:
- Tolerate "mulistr" (this is used in many extensions, test suites
as well as in MediaWiki core)
"foo\
bar"
- Use "jquery: true" instead of "jQuery" so that JSHint can optimize
for jQuery edge cases.
Misc issues fixed:
* Trailing comma's in jquery.tablesorter.test
* Missing semi-colon in testrunner.js
* Remove backwards-compatible line for "equals()" and "same()".
These have been deprecated in QUnit since 2009 (which is way
before we even started looking at QUnit).
Inside QUnit itself is a deprecation notice, I don't know why
I added this compatibility line, it is stupid and overrides the
nice deprecation-warning that QUnit has built in for it).
* Use QUnit.push inside assertTrue and assertFalse.
QUnit assertion methods must not call each other, in order to keep
the call stack length as expected so that QUnit can report the
file and line number of the caller of the assertion in case of
failure etc.
Change-Id: I5cded6e8c32dba39170a02bdd3236c8b7b04d269
25 files changed: