Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/56625
Change subject: Minor QUnit test fixes
......................................................................
Minor QUnit test fixes
Avoid using globals
Tell test how many to expect
Change-Id: Ied1cd5f0ae56951bfad37772a0a73dcd251b51b3
---
M tests/js/widgets/carousel.js
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/25/56625/1
diff --git a/tests/js/widgets/carousel.js b/tests/js/widgets/carousel.js
index c812382..904b87e 100644
--- a/tests/js/widgets/carousel.js
+++ b/tests/js/widgets/carousel.js
@@ -2,9 +2,9 @@
var Carousel = M.require( 'widgets/carousel' );
- module( 'MobileFrontend Carousel' );
+ QUnit.module( 'MobileFrontend Carousel' );
- test( '#next', function() {
+ QUnit.test( '#next', 5, function() {
var c = new Carousel();
strictEqual( c.totalPages, 3, 'There are 3 pages in the
carousel' );
strictEqual( c.page, 0, 'Initialises to page 0' );
@@ -16,7 +16,7 @@
strictEqual( c.page, 2, 'Still page 2 (no more pages)' );
} );
- test( '#prev', function() {
+ QUnit.test( '#prev', 4, function() {
var c = new Carousel();
strictEqual( c.page, 0, 'Initialises to page 0' );
c.previous();
@@ -27,7 +27,7 @@
strictEqual( c.page, 0, 'Back on page 0' );
} );
- test( '#showCurrentPage', function() {
+ QUnit.test( '#showCurrentPage', 3, function() {
var c = new Carousel();
strictEqual( c.page, 0, 'Initialises to page 0' );
c.next();
--
To view, visit https://gerrit.wikimedia.org/r/56625
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied1cd5f0ae56951bfad37772a0a73dcd251b51b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits