-( function ( mw, $ ) {
+( function ( mw ) {
QUnit.module( 'mediawiki.Uri', QUnit.newMwEnvironment( {
setup: function () {
this.mwUriOrg = mw.Uri;
}
} ) );
- $.each( [ true, false ], function ( i, strictMode ) {
+ [ true, false ].forEach( function ( strictMode ) {
QUnit.test( 'Basic construction and properties (' + ( strictMode ? '' : 'non-' ) + 'strict mode)', function ( assert ) {
var uriString, uri;
uriString = 'http://www.ietf.org/rfc/rfc2396.txt';
} );
assert.equal( uri.toString(), 'http://example.com/bar/baz', 'normalize URI without protocol or // in loose mode' );
- /*jshint -W001 */
uri = new mw.Uri( 'http://example.com/index.php?key=key&hasOwnProperty=hasOwnProperty&constructor=constructor&watch=watch' );
assert.deepEqual(
uri.query,
},
'Keys in query strings support names of Object prototypes (bug T114344)'
);
- /*jshint +W001 */
} );
QUnit.test( 'Constructor( Object )', function ( assert ) {
href = uri.toString();
assert.equal( href, testProtocol + testServer + ':' + testPort + testPath, 'Root-relative URL gets host, protocol, and port supplied' );
} );
-}( mediaWiki, jQuery ) );
+}( mediaWiki ) );