Krinkle has uploaded a new change for review.
https://gerrit.wikimedia.org/r/49811
Change subject: Tests: Add missing expect numbers in QUnit tests.
......................................................................
Tests: Add missing expect numbers in QUnit tests.
Various tests were failing due to missing or incorrect numbers.
Follows-up Iedb304f8
Change-Id: I665b8c4c1501ea058ecdc8e846f8b4efa4eded29
---
M tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
M tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
3 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/11/49811/1
diff --git a/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
b/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
index 140da38..906369e 100644
--- a/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
@@ -1,12 +1,12 @@
( function ( $ ) {
QUnit.module( 'jquery.hidpi', QUnit.newMwEnvironment() );
- QUnit.test( 'devicePixelRatio', function ( assert ) {
+ QUnit.test( 'devicePixelRatio', 1, function ( assert ) {
var devicePixelRatio = $.devicePixelRatio();
assert.equal( typeof devicePixelRatio, 'number',
'$.devicePixelRatio() returns a number' );
} );
- QUnit.test( 'matchSrcSet', function ( assert ) {
+ QUnit.test( 'matchSrcSet', 6, function ( assert ) {
var srcset = 'onefive.png 1.5x, two.png 2x';
// Nice exact matches
diff --git a/tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js
b/tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js
index 2765498..3b292b2 100644
--- a/tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js
@@ -1,7 +1,7 @@
( function ( $ ) {
QUnit.module( 'jquery.mwExtension', QUnit.newMwEnvironment() );
- QUnit.test( 'String functions', function ( assert ) {
+ QUnit.test( 'String functions', 7, function ( assert ) {
assert.equal( $.trimLeft( ' foo bar ' ), 'foo bar ',
'trimLeft' );
assert.equal( $.trimRight( ' foo bar ' ), ' foo bar',
'trimRight' );
assert.equal( $.ucFirst( 'foo' ), 'Foo', 'ucFirst' );
@@ -15,7 +15,7 @@
assert.equal( $.escapeRE( '0123456789' ), '0123456789',
'escapeRE - Leave numbers alone' );
} );
- QUnit.test( 'Is functions', function ( assert ) {
+ QUnit.test( 'Is functions', 15, function ( assert ) {
assert.strictEqual( $.isDomElement( document.getElementById(
'qunit-header' ) ), true,
'isDomElement: #qunit-header Node' );
assert.strictEqual( $.isDomElement( document.getElementById(
'random-name' ) ), false,
@@ -44,7 +44,7 @@
assert.strictEqual( $.isEmpty( { length: 0 } ), true,
'isEmptry: { length: 0 }' );
} );
- QUnit.test( 'Comparison functions', function ( assert ) {
+ QUnit.test( 'Comparison functions', 5, function ( assert ) {
assert.ok( $.compareArray( [0, 'a', [], [2, 'b'] ], [0, 'a',
[], [2, 'b'] ] ),
'compareArray: Two deep arrays that are excactly the
same' );
assert.ok( !$.compareArray( [1], [2] ), 'compareArray: Two
different arrays (false)' );
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
b/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
index c61365e..95a16c8 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
@@ -81,7 +81,7 @@
} );
}
- QUnit.test( 'Replace', 9, function ( assert ) {
+ QUnit.test( 'Replace', 7, function ( assert ) {
var parser = mw.jqueryMsg.getMessageFunction();
mw.messages.set( 'simple', 'Foo $1 baz $2' );
--
To view, visit https://gerrit.wikimedia.org/r/49811
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I665b8c4c1501ea058ecdc8e846f8b4efa4eded29
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits