diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
commit | 63601400e476c6cf43d985f3e7b9864681695ed4 (patch) | |
tree | f7846203a952e38aaf66989d0a4702779f549962 /tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js | |
parent | 8ff01378c9e0207f9169b81966a51def645b6a51 (diff) |
Update to MediaWiki 1.20.2
this update includes:
* adjusted Arch Linux skin
* updated FluxBBAuthPlugin
* patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js')
-rw-r--r-- | tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js b/tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js index 3a2d0d83..5b566ae0 100644 --- a/tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js @@ -1,58 +1,58 @@ -module( 'jquery.mwExtension', QUnit.newMwEnvironment() ); +QUnit.module( 'jquery.mwExtension', QUnit.newMwEnvironment() ); -test( 'String functions', function() { +QUnit.test( 'String functions', function ( assert ) { - equal( $.trimLeft( ' foo bar ' ), 'foo bar ', 'trimLeft' ); - equal( $.trimRight( ' foo bar ' ), ' foo bar', 'trimRight' ); - equal( $.ucFirst( 'foo' ), 'Foo', 'ucFirst' ); + assert.equal( $.trimLeft( ' foo bar ' ), 'foo bar ', 'trimLeft' ); + assert.equal( $.trimRight( ' foo bar ' ), ' foo bar', 'trimRight' ); + assert.equal( $.ucFirst( 'foo' ), 'Foo', 'ucFirst' ); - equal( $.escapeRE( '<!-- ([{+mW+}]) $^|?>' ), + assert.equal( $.escapeRE( '<!-- ([{+mW+}]) $^|?>' ), '<!\\-\\- \\(\\[\\{\\+mW\\+\\}\\]\\) \\$\\^\\|\\?>', 'escapeRE - Escape specials' ); - equal( $.escapeRE( 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ), + assert.equal( $.escapeRE( 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'escapeRE - Leave uppercase alone' ); - equal( $.escapeRE( 'abcdefghijklmnopqrstuvwxyz' ), + assert.equal( $.escapeRE( 'abcdefghijklmnopqrstuvwxyz' ), 'abcdefghijklmnopqrstuvwxyz', 'escapeRE - Leave lowercase alone' ); - equal( $.escapeRE( '0123456789' ), '0123456789', 'escapeRE - Leave numbers alone' ); + assert.equal( $.escapeRE( '0123456789' ), '0123456789', 'escapeRE - Leave numbers alone' ); }); -test( 'Is functions', function() { +QUnit.test( 'Is functions', function ( assert ) { - strictEqual( $.isDomElement( document.getElementById( 'qunit-header' ) ), true, + assert.strictEqual( $.isDomElement( document.getElementById( 'qunit-header' ) ), true, 'isDomElement: #qunit-header Node' ); - strictEqual( $.isDomElement( document.getElementById( 'random-name' ) ), false, + assert.strictEqual( $.isDomElement( document.getElementById( 'random-name' ) ), false, 'isDomElement: #random-name (null)' ); - strictEqual( $.isDomElement( document.getElementsByTagName( 'div' ) ), false, + assert.strictEqual( $.isDomElement( document.getElementsByTagName( 'div' ) ), false, 'isDomElement: getElementsByTagName Array' ); - strictEqual( $.isDomElement( document.getElementsByTagName( 'div' )[0] ), true, + assert.strictEqual( $.isDomElement( document.getElementsByTagName( 'div' )[0] ), true, 'isDomElement: getElementsByTagName(..)[0] Node' ); - strictEqual( $.isDomElement( $( 'div' ) ), false, + assert.strictEqual( $.isDomElement( $( 'div' ) ), false, 'isDomElement: jQuery object' ); - strictEqual( $.isDomElement( $( 'div' ).get(0) ), true, + assert.strictEqual( $.isDomElement( $( 'div' ).get(0) ), true, 'isDomElement: jQuery object > Get node' ); - strictEqual( $.isDomElement( document.createElement( 'div' ) ), true, + assert.strictEqual( $.isDomElement( document.createElement( 'div' ) ), true, 'isDomElement: createElement' ); - strictEqual( $.isDomElement( { foo: 1 } ), false, + assert.strictEqual( $.isDomElement( { foo: 1 } ), false, 'isDomElement: Object' ); - strictEqual( $.isEmpty( 'string' ), false, 'isEmptry: "string"' ); - strictEqual( $.isEmpty( '0' ), true, 'isEmptry: "0"' ); - strictEqual( $.isEmpty( '' ), true, 'isEmptry: ""' ); - strictEqual( $.isEmpty( 1 ), false, 'isEmptry: 1' ); - strictEqual( $.isEmpty( [] ), true, 'isEmptry: []' ); - strictEqual( $.isEmpty( {} ), true, 'isEmptry: {}' ); + assert.strictEqual( $.isEmpty( 'string' ), false, 'isEmptry: "string"' ); + assert.strictEqual( $.isEmpty( '0' ), true, 'isEmptry: "0"' ); + assert.strictEqual( $.isEmpty( '' ), true, 'isEmptry: ""' ); + assert.strictEqual( $.isEmpty( 1 ), false, 'isEmptry: 1' ); + assert.strictEqual( $.isEmpty( [] ), true, 'isEmptry: []' ); + assert.strictEqual( $.isEmpty( {} ), true, 'isEmptry: {}' ); // Documented behaviour - strictEqual( $.isEmpty( { length: 0 } ), true, 'isEmptry: { length: 0 }' ); + assert.strictEqual( $.isEmpty( { length: 0 } ), true, 'isEmptry: { length: 0 }' ); }); -test( 'Comparison functions', function() { +QUnit.test( 'Comparison functions', function ( assert ) { - ok( $.compareArray( [0, 'a', [], [2, 'b'] ], [0, "a", [], [2, "b"] ] ), + assert.ok( $.compareArray( [0, 'a', [], [2, 'b'] ], [0, "a", [], [2, "b"] ] ), 'compareArray: Two deep arrays that are excactly the same' ); - ok( !$.compareArray( [1], [2] ), 'compareArray: Two different arrays (false)' ); + assert.ok( !$.compareArray( [1], [2] ), 'compareArray: Two different arrays (false)' ); - ok( $.compareObject( {}, {} ), 'compareObject: Two empty objects' ); - ok( $.compareObject( { foo: 1 }, { foo: 1 } ), 'compareObject: Two the same objects' ); - ok( !$.compareObject( { bar: true }, { baz: false } ), + assert.ok( $.compareObject( {}, {} ), 'compareObject: Two empty objects' ); + assert.ok( $.compareObject( { foo: 1 }, { foo: 1 } ), 'compareObject: Two the same objects' ); + assert.ok( !$.compareObject( { bar: true }, { baz: false } ), 'compareObject: Two different objects (false)' ); }); |