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

Change subject: tests: Make compartible with QUnit 2
......................................................................


tests: Make compartible with QUnit 2

Change-Id: Id067022f009ac8d73291eee55d7c14ef4198e7e8
---
M tests/qunit/engine/misc/test_flow-handlebars.js
M tests/qunit/engine/misc/test_mw-ui.enhance.js
2 files changed, 12 insertions(+), 12 deletions(-)

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



diff --git a/tests/qunit/engine/misc/test_flow-handlebars.js 
b/tests/qunit/engine/misc/test_flow-handlebars.js
index 84c893e..94ae428 100644
--- a/tests/qunit/engine/misc/test_flow-handlebars.js
+++ b/tests/qunit/engine/misc/test_flow-handlebars.js
@@ -29,28 +29,28 @@
                }
        } );
 
-       QUnit.test( 'Handlebars.prototype.processTemplate', 1, function ( 
assert ) {
+       QUnit.test( 'Handlebars.prototype.processTemplate', function ( assert ) 
{
                assert.strictEqual( this.handlebarsProto.processTemplate( 
'foo', { val: 'Hello' } ),
                        '<div>Magic.</div>', 'Getting a template works.' );
        } );
 
-       QUnit.test( 'Handlebars.prototype.processTemplateGetFragment', 1, 
function ( assert ) {
+       QUnit.test( 'Handlebars.prototype.processTemplateGetFragment', function 
( assert ) {
                assert.strictEqual( 
this.handlebarsProto.processTemplateGetFragment( 'foo', { val: 'Hello' } 
).childNodes.length,
                        1, 'Return a fragment with the div child node' );
        } );
 
-       QUnit.test( 'Handlebars.prototype.getTemplate', 2, function ( assert ) {
+       QUnit.test( 'Handlebars.prototype.getTemplate', function ( assert ) {
                assert.strictEqual( this.handlebarsProto.getTemplate( 'foo' 
)(), 'Stubbed.', 'Getting a template works.' );
                assert.strictEqual( this.handlebarsProto.getTemplate( 'foo' 
)(), 'Stubbed.', 'Getting a template from cache works.' );
        } );
 
        // Helpers
-       QUnit.test( 'Handlebars.prototype.callHelper', 1, function ( assert ) {
+       QUnit.test( 'Handlebars.prototype.callHelper', function ( assert ) {
                assert.strictEqual( this.handlebarsProto.callHelper( 
'_qunit_helper_test', 1, 2 ),
                        3, 'Check the helper was called.' );
        } );
 
-       QUnit.test( 'Handlebars.prototype.eachPost', 3, function ( assert ) {
+       QUnit.test( 'Handlebars.prototype.eachPost', function ( assert ) {
                var ctx = {
                        posts: {
                                1: [ 300 ],
@@ -67,7 +67,7 @@
                assert.deepEqual( this.handlebarsProto.eachPost( ctx, 2, {} ), 
{ content: null }, 'Missing revision id.' );
        } );
 
-       QUnit.test( 'Handlebars.prototype.ifCond', 8, function ( assert ) {
+       QUnit.test( 'Handlebars.prototype.ifCond', function ( assert ) {
                assert.strictEqual( this.handlebarsProto.ifCond( 'foo', '===', 
'bar', this.opts ), 'nope', 'not equal' );
                assert.strictEqual( this.handlebarsProto.ifCond( 'foo', '===', 
'foo', this.opts ), 'ok', 'equal' );
                assert.strictEqual( this.handlebarsProto.ifCond( true, 'or', 
false, this.opts ), 'ok', 'true || false' );
@@ -78,17 +78,17 @@
                assert.strictEqual( this.handlebarsProto.ifCond( 'foo', '!==', 
'bar', this.opts ), 'ok' );
        } );
 
-       QUnit.test( 'Handlebars.prototype.ifAnonymous', 2, function () {
+       QUnit.test( 'Handlebars.prototype.ifAnonymous', function () {
                strictEqual( this.handlebarsProto.ifAnonymous( this.opts ), 
'ok', 'User should be anonymous first time.' );
                strictEqual( this.handlebarsProto.ifAnonymous( this.opts ), 
'nope', 'User should be logged in on second call.' );
        } );
 
-       QUnit.test( 'Handlebars.prototype.concat', 2, function () {
+       QUnit.test( 'Handlebars.prototype.concat', function () {
                strictEqual( this.handlebarsProto.concat( 'a', 'b', 'c', 
this.opts ), 'abc', 'Check concat working fine.' );
                strictEqual( this.handlebarsProto.concat( this.opts ), '', 
'Without arguments.' );
        } );
 
-       QUnit.test( 'Handlebars.prototype.progressiveEnhancement', 5, function 
() {
+       QUnit.test( 'Handlebars.prototype.progressiveEnhancement', function () {
                var opts = $.extend( { hash: { type: 'insert', target: 'abc', 
id: 'def' } }, this.opts ),
                        $div = $( document.createElement( 'div' ) );
 
diff --git a/tests/qunit/engine/misc/test_mw-ui.enhance.js 
b/tests/qunit/engine/misc/test_mw-ui.enhance.js
index 8170df6..8397722 100644
--- a/tests/qunit/engine/misc/test_mw-ui.enhance.js
+++ b/tests/qunit/engine/misc/test_mw-ui.enhance.js
@@ -1,7 +1,7 @@
 ( function ( $ ) {
        QUnit.module( 'ext.flow: mediawiki.ui.enhance' );
 
-       QUnit.test( 'Forms with required fields have certain buttons disabled 
by default', 6, function ( assert ) {
+       QUnit.test( 'Forms with required fields have certain buttons disabled 
by default', function ( assert ) {
                var $forms = [
                        $( '<form><input class="mw-ui-input" required><button 
data-role="action" class="mw-ui-button">go</button></form>' ),
                        $( '<form><input class="mw-ui-input" required><button 
data-role="submit" class="mw-ui-button">go</button></form>' ),
@@ -29,7 +29,7 @@
                        'Buttons are disabled when required textarea but 
required input does not.' );
        } );
 
-       QUnit.test( 'mw-ui-tooltip', 4, function ( assert ) {
+       QUnit.test( 'mw-ui-tooltip', function ( assert ) {
                assert.ok( mw.tooltip, 'mw.tooltip exists' );
 
                // Create a tooltip using body
@@ -43,7 +43,7 @@
                $( 'body' ).attr( 'title', '' );
        } );
 
-       QUnit.test( 'mw-ui-modal', 15, function ( assert ) {
+       QUnit.test( 'mw-ui-modal', function ( assert ) {
                var modal, $node;
 
                assert.ok( mw.tooltip, 'mw.Modal exists' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id067022f009ac8d73291eee55d7c14ef4198e7e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to