Allow custom teardown/setup per module through Qunit.newMwEnvironment
authorTimo Tijhof <ttijhof@wikimedia.org>
Sat, 12 May 2012 22:37:30 +0000 (00:37 +0200)
committerTimo Tijhof <ttijhof@wikimedia.org>
Sat, 12 May 2012 22:37:30 +0000 (00:37 +0200)
commit498ef943ddee8b0fcc78c2bc8d0abc1cd0fc5223
treee6fae4d65ff1cb63a43bfd004e7e18f8f0a6355d
parenta682b7335a179cd0693d838c9bbd62485fe7cbad
Allow custom teardown/setup per module through Qunit.newMwEnvironment

- Instead of having newMwEnvironment only create an object with
  setup() and teardown() that is passed to module() which uses them.

  Also allow a module test to pass additional setup/teardown to run.
  Otherwise one would have to extend newMwEnvironment, this is
  simpler.

- Also added a few unit tests of the test runner's newMwEnvironment
  method itself. (also serves as document/example for how to use it)

- This changes the signature of QUnit.newMwEnvironment. Was only
  used in 2 places in core. Adding release notes just in case.

- Needed to fix a unit test breakage in mw.Uri

Change-Id: I2c17f4a309208276ab7bd2420b720c0d8e4bf328
RELEASE-NOTES-1.20
tests/qunit/data/testrunner.js
tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js