Review of unit test suites
authorKrinkle <krinkle@users.mediawiki.org>
Fri, 10 Jun 2011 19:55:40 +0000 (19:55 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Fri, 10 Jun 2011 19:55:40 +0000 (19:55 +0000)
commitd0b27d21d9e3838b12ea598856f392711dab27e6
tree5f5a4c87ebd206908b7ae63f1e754f03f031ed77
parent1866fa13813dd7a2e05173d2048c2a10d44ad466
Review of unit test suites
* There's more than ok(), equal() and deepEqual(). Using the others as appropriate.
** Considered: strictEqual(a,b) tests the same as ok(a===b). But the latter doesn't include the values in the report when it fails. So strictEqual saves a lot of time in debugging (especially on TestSwarm where the report is all you have, there "not okay" or "Expected { foo: 500 }, Given: ['bar', '250']" is a big saver.
* Adding an "expect" to every test.
* Applying whitespace conventions and bringing consistency in the use of mw, mediaWiki, $, $j, jQuery. (except in the initial test where the aliases are being checked)
* Added cleanup for added CSSStyleSheet
* Making IPtest more complete (Based on IPTest.php)
tests/qunit/sample/awesome.js
tests/qunit/suites/resources/jquery/jquery.autoEllipsis.js
tests/qunit/suites/resources/jquery/jquery.client.js
tests/qunit/suites/resources/jquery/jquery.colorUtil.js
tests/qunit/suites/resources/jquery/jquery.mwPrototypes.js
tests/qunit/suites/resources/jquery/jquery.tabIndex.js
tests/qunit/suites/resources/mediawiki.util/mediawiki.util.js
tests/qunit/suites/resources/mediawiki/mediawiki.js
tests/qunit/suites/resources/mediawiki/mediawiki.user.js