diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2015-09-03 02:53:29 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-09-07 20:03:50 +0300 |
commit | e35bdc1a22d7b5786b8f849acdc4653f1dc25e9b (patch) | |
tree | cd479b6eb59e53f91460a11f495d414f682efac8 | |
parent | 99975c44abc8c1092764c7fca3ccfe89fc832b87 (diff) | |
download | jquery-e35bdc1a22d7b5786b8f849acdc4653f1dc25e9b.tar.gz jquery-e35bdc1a22d7b5786b8f849acdc4653f1dc25e9b.zip |
Build: correct style tests files which could be automatically corrected
-rw-r--r-- | test/data/support/csp.js | 4 | ||||
-rw-r--r-- | test/integration/data/gh-1764-fullscreen.js | 6 | ||||
-rw-r--r-- | test/jquery.js | 20 | ||||
-rw-r--r-- | test/promises_aplus_adapter.js | 4 |
4 files changed, 18 insertions, 16 deletions
diff --git a/test/data/support/csp.js b/test/data/support/csp.js index a25bd8ae5..5ebdcea08 100644 --- a/test/data/support/csp.js +++ b/test/data/support/csp.js @@ -1,3 +1,3 @@ -jQuery(function() { +jQuery( function() { parent.iframeCallback( getComputedSupport( jQuery.support ) ); -}); +} ); diff --git a/test/integration/data/gh-1764-fullscreen.js b/test/integration/data/gh-1764-fullscreen.js index c13c609f3..b2bb4cdb5 100644 --- a/test/integration/data/gh-1764-fullscreen.js +++ b/test/integration/data/gh-1764-fullscreen.js @@ -17,10 +17,10 @@ function bootstrapFrom( mainSelector, mode ) { document.webkitExitFullscreen; function isFullscreen() { - return !!(document.fullscreenElement || + return !!( document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || - document.msFullscreenElement); + document.msFullscreenElement ); } function requestFullscreen( element ) { @@ -82,7 +82,7 @@ function bootstrapFrom( mainSelector, mode ) { if ( isFullscreen() ) { exitFullscreen(); } else { - requestFullscreen( jQuery( mainSelector + " .container" )[0] ); + requestFullscreen( jQuery( mainSelector + " .container" )[ 0 ] ); } } diff --git a/test/jquery.js b/test/jquery.js index 586bd4202..233e696d9 100644 --- a/test/jquery.js +++ b/test/jquery.js @@ -1,5 +1,5 @@ // Use the right jQuery source on the test page (and iframes) -(function() { +( function() { /* global loadTests: false */ var src, @@ -8,21 +8,23 @@ require = window.require || parent.require; // iFrames won't load AMD (the iframe tests synchronously expect jQuery to be there) - QUnit.config.urlConfig.push({ + QUnit.config.urlConfig.push( { id: "amd", label: "Load with AMD", tooltip: "Load the AMD jQuery file (and its dependencies)" - }); + } ); + // If QUnit is on window, this is the main window // This detection allows AMD tests to be run in an iframe if ( QUnit.urlParams.amd && window.QUnit ) { - require.config({ + require.config( { baseUrl: path, paths: { sizzle: "external/sizzle/dist/sizzle" } - }); + } ); src = "src/jquery"; + // Include tests if specified if ( typeof loadTests !== "undefined" ) { require( [ src ], loadTests ); @@ -33,11 +35,11 @@ } // Config parameter to use minified jQuery - QUnit.config.urlConfig.push({ + QUnit.config.urlConfig.push( { id: "dev", label: "Load unminified", tooltip: "Load the development (unminified) jQuery file" - }); + } ); if ( QUnit.urlParams.dev ) { src = "dist/jquery.js"; } else { @@ -50,7 +52,7 @@ // Synchronous-only tests // Other tests are loaded from the test page if ( typeof loadTests !== "undefined" ) { - document.write( "<script src='" + path + "test/unit/ready.js'><\x2Fscript>"); + document.write( "<script src='" + path + "test/unit/ready.js'><\x2Fscript>" ); } -})(); +} )(); diff --git a/test/promises_aplus_adapter.js b/test/promises_aplus_adapter.js index decc3e0f0..c7440b969 100644 --- a/test/promises_aplus_adapter.js +++ b/test/promises_aplus_adapter.js @@ -2,7 +2,7 @@ "use strict"; -require( "jsdom" ).env( "", function ( errors, window ) { +require( "jsdom" ).env( "", function( errors, window ) { if ( errors ) { console.error( errors ); return; @@ -10,7 +10,7 @@ require( "jsdom" ).env( "", function ( errors, window ) { var jQuery = require( ".." )( window ); - exports.deferred = function () { + exports.deferred = function() { var deferred = jQuery.Deferred(); return { |