Lint: Go-go-gadget jshint! Passing entire JS code base (again).
[lhc/web/wiklou.git] / tests / qunit / suites / resources / jquery / jquery.hidpi.test.js
index cf309df..d75c378 100644 (file)
@@ -1,20 +1,22 @@
-QUnit.module( 'jquery.hidpi', QUnit.newMwEnvironment() );
+( function ( $ ) {
+       QUnit.module( 'jquery.hidpi', QUnit.newMwEnvironment() );
 
-QUnit.test( 'devicePixelRatio', function ( assert ) {
-       var devicePixelRatio = $.devicePixelRatio();
-       assert.equal( typeof devicePixelRatio, 'number', '$.devicePixelRatio() returns a number' );
-});
+       QUnit.test( 'devicePixelRatio', function ( assert ) {
+               var devicePixelRatio = $.devicePixelRatio();
+               assert.equal( typeof devicePixelRatio, 'number', '$.devicePixelRatio() returns a number' );
+       });
 
-QUnit.test( 'matchSrcSet', function ( assert ) {
-       var srcset = 'onefive.png 1.5x, two.png 2x';
+       QUnit.test( 'matchSrcSet', function ( assert ) {
+               var srcset = 'onefive.png 1.5x, two.png 2x';
 
-       // Nice exact matches
-       assert.equal( $.matchSrcSet( 1, srcset ), null, '1.0 gives no match' );
-       assert.equal( $.matchSrcSet( 1.5, srcset ), 'onefive.png', '1.5 gives match' );
-       assert.equal( $.matchSrcSet( 2, srcset ), 'two.png', '2 gives match' );
+               // Nice exact matches
+               assert.equal( $.matchSrcSet( 1, srcset ), null, '1.0 gives no match' );
+               assert.equal( $.matchSrcSet( 1.5, srcset ), 'onefive.png', '1.5 gives match' );
+               assert.equal( $.matchSrcSet( 2, srcset ), 'two.png', '2 gives match' );
 
-       // Non-exact matches; should return the next-biggest specified
-       assert.equal( $.matchSrcSet( 1.25, srcset ), null, '1.25 gives no match' );
-       assert.equal( $.matchSrcSet( 1.75, srcset ), 'onefive.png', '1.75 gives match to 1.5' );
-       assert.equal( $.matchSrcSet( 2.25, srcset ), 'two.png', '2.25 gives match to 2' );
-});
+               // Non-exact matches; should return the next-biggest specified
+               assert.equal( $.matchSrcSet( 1.25, srcset ), null, '1.25 gives no match' );
+               assert.equal( $.matchSrcSet( 1.75, srcset ), 'onefive.png', '1.75 gives match to 1.5' );
+               assert.equal( $.matchSrcSet( 2.25, srcset ), 'two.png', '2.25 gives match to 2' );
+       });
+}( jQuery ) );