]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - tests/qunit/suites/resources/jquery/jquery.getAttrs.test.js
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / tests / qunit / suites / resources / jquery / jquery.getAttrs.test.js
diff --git a/tests/qunit/suites/resources/jquery/jquery.getAttrs.test.js b/tests/qunit/suites/resources/jquery/jquery.getAttrs.test.js
new file mode 100644 (file)
index 0000000..74d8509
--- /dev/null
@@ -0,0 +1,14 @@
+( function ( $ ) {
+       QUnit.module( 'jquery.getAttrs', QUnit.newMwEnvironment() );
+
+       QUnit.test( 'getAttrs()', function ( assert ) {
+               var attrs = {
+                               foo: 'bar',
+                               class: 'lorem',
+                               'data-foo': 'data value'
+                       },
+                       $el = $( '<div>' ).attr( attrs );
+
+               assert.propEqual( $el.getAttrs(), attrs, 'keys and values match' );
+       } );
+}( jQuery ) );