HomePhabricator

tests: Remove QUnit.newMwEnvironment from ve.test.utils.mwEnvironment

Authored by Krinkle on Apr 25 2014, 11:51 PM.

Description

tests: Remove QUnit.newMwEnvironment from ve.test.utils.mwEnvironment

Two problems:

  • At least one caller already calls QUnit.newMwEnvironment(), which means it runs twice which is unsupported and breaks If4141df10eae55 in core.
  • It assumes the return will contain 'setup' and 'teardown', which is internal and also changes with If4141df10eae55 in core.

Using 'setup' and 'teardown' for this within VE-MW is fine.

First attempt is to simply remove it. Uses that already called
QUnit.newMwEnvironment are effectively unchanged. Uses that didn't
and only pass ve.test.utils.mwEnvironment to QUnit.module directly
will now run without core's QUnit.newMwEnvironment() setup/teardown.

If that breaks anything, we can add it back to those tests that actually
need it.

Change-Id: I9ef0368ba58daf1c7dc92d083ae79c108cc27638