JGonera has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/67907


Change subject: Fix QUnit.asyncTest() and removed unused test code
......................................................................

Fix QUnit.asyncTest() and removed unused test code

"teardown" was misspelled in test_mf-photo.js which resulted in Sinon
fake timers not being cleaned up, which in turn made QUnit.asyncTest()
hung indefinitely.

Also, remove unused test code from test_mf-application.js (a module
without tests).

Change-Id: If599c0702b0cd0dfc4fcd87c237c388e11b28dbe
---
M tests/javascripts/common/test_mf-application.js
M tests/javascripts/modules/test_mf-photo.js
2 files changed, 1 insertion(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/07/67907/1

diff --git a/tests/javascripts/common/test_mf-application.js 
b/tests/javascripts/common/test_mf-application.js
index 87ff5c1..8aa3eb1 100644
--- a/tests/javascripts/common/test_mf-application.js
+++ b/tests/javascripts/common/test_mf-application.js
@@ -1,16 +1,5 @@
 ( function ( $, MFE ) {
 
-QUnit.module("MobileFrontend application.js: history", {
-       setup: function() {
-               window.location.hash = "#hash1";
-               window.location.hash = "#hash2";
-               $( '<div id="hash3">' ).appendTo( document.body );
-       },
-       teardown: function() {
-               $( '#hash3' ).remove();
-       }
-});
-
 QUnit.module( 'MobileFrontend modules' );
 
 QUnit.test( 'define()', 1, function() {
diff --git a/tests/javascripts/modules/test_mf-photo.js 
b/tests/javascripts/modules/test_mf-photo.js
index 2075563..08b1765 100644
--- a/tests/javascripts/modules/test_mf-photo.js
+++ b/tests/javascripts/modules/test_mf-photo.js
@@ -33,7 +33,7 @@
                mw.config.set( 'wgMFLeadPhotoUploadCssSelector', 'img, .navbox, 
.infobox' );
                this.clock = sinon.useFakeTimers();
        },
-       tearDown: function () {
+       teardown: function() {
                mw.config.set( 'wgMFLeadPhotoUploadCssSelector', 
_wgMFLeadPhotoUploadCssSelector );
                this.clock.restore();
        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If599c0702b0cd0dfc4fcd87c237c388e11b28dbe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera <[email protected]>

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

Reply via email to