summaryrefslogtreecommitdiff
path: root/www/wiki/tests/qunit/suites/resources/jquery/jquery.getAttrs.test.js
blob: 74d85090d64441b5fc69d4168243b22ba34fa53f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 ) );