summaryrefslogtreecommitdiff
path: root/tests/qunit/suites/resources/jquery/jquery.mwPrototypes.js
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /tests/qunit/suites/resources/jquery/jquery.mwPrototypes.js
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'tests/qunit/suites/resources/jquery/jquery.mwPrototypes.js')
-rw-r--r--tests/qunit/suites/resources/jquery/jquery.mwPrototypes.js56
1 files changed, 0 insertions, 56 deletions
diff --git a/tests/qunit/suites/resources/jquery/jquery.mwPrototypes.js b/tests/qunit/suites/resources/jquery/jquery.mwPrototypes.js
deleted file mode 100644
index bb6d2a1b..00000000
--- a/tests/qunit/suites/resources/jquery/jquery.mwPrototypes.js
+++ /dev/null
@@ -1,56 +0,0 @@
-module( 'jquery.mwPrototypes.js' );
-
-test( 'String functions', function() {
-
- equal( $.trimLeft( ' foo bar ' ), 'foo bar ', 'trimLeft' );
- equal( $.trimRight( ' foo bar ' ), ' foo bar', 'trimRight' );
- equal( $.ucFirst( 'foo'), 'Foo', 'ucFirst' );
-
- equal( $.escapeRE( '<!-- ([{+mW+}]) $^|?>' ),
- '<!\\-\\- \\(\\[\\{\\+mW\\+\\}\\]\\) \\$\\^\\|\\?>', 'escapeRE - Escape specials' );
- equal( $.escapeRE( 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ),
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'escapeRE - Leave uppercase alone' );
- equal( $.escapeRE( 'abcdefghijklmnopqrstuvwxyz' ),
- 'abcdefghijklmnopqrstuvwxyz', 'escapeRE - Leave lowercase alone' );
- equal( $.escapeRE( '0123456789' ), '0123456789', 'escapeRE - Leave numbers alone' );
-});
-
-test( 'Is functions', function() {
-
- strictEqual( $.isDomElement( document.getElementById( 'qunit-header' ) ), true,
- 'isDomElement: #qunit-header Node' );
- strictEqual( $.isDomElement( document.getElementById( 'random-name' ) ), false,
- 'isDomElement: #random-name (null)' );
- strictEqual( $.isDomElement( document.getElementsByTagName( 'div' ) ), false,
- 'isDomElement: getElementsByTagName Array' );
- strictEqual( $.isDomElement( document.getElementsByTagName( 'div' )[0] ), true,
- 'isDomElement: getElementsByTagName(..)[0] Node' );
- strictEqual( $.isDomElement( $( 'div' ) ), false,
- 'isDomElement: jQuery object' );
- strictEqual( $.isDomElement( $( 'div' ).get(0) ), true,
- 'isDomElement: jQuery object > Get node' );
- strictEqual( $.isDomElement( document.createElement( 'div' ) ), true,
- 'isDomElement: createElement' );
- 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( {} ), true, 'isEmptry: {}' );
-
- // Documented behaviour
- strictEqual( $.isEmpty( { length: 0 } ), true, 'isEmptry: { length: 0 }' );
-});
-
-test( 'Comparison functions', function() {
-
- 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)' );
-
- ok( $.compareObject( {}, {} ), 'compareObject: Two empty objects' );
- ok( $.compareObject( { foo: 1 }, { foo: 1 } ), 'compareObject: Two the same objects' );
- ok( !$.compareObject( { bar: true }, { baz: false } ),
- 'compareObject: Two different objects (false)' );
-});