jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/129857 )

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


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
---
M modules/ve-mw/tests/ve.test.utils.js
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/modules/ve-mw/tests/ve.test.utils.js 
b/modules/ve-mw/tests/ve.test.utils.js
index b140dae..063d39e 100644
--- a/modules/ve-mw/tests/ve.test.utils.js
+++ b/modules/ve-mw/tests/ve.test.utils.js
@@ -95,10 +95,10 @@
        // On load, teardown overrides so the first core tests run correctly
        teardownOverrides();
 
-       return QUnit.newMwEnvironment( {
+       return {
                setup: setupOverrides,
                teardown: teardownOverrides
-       } );
+       };
 }() );
 
 ( function () {

-- 
To view, visit https://gerrit.wikimedia.org/r/129857
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ef0368ba58daf1c7dc92d083ae79c108cc27638
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to