aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/core.js14
-rw-r--r--test/unit/data.js16
-rw-r--r--test/unit/support.js15
3 files changed, 25 insertions, 20 deletions
diff --git a/test/unit/core.js b/test/unit/core.js
index 20e1178d2..8817c95f9 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -17,13 +17,6 @@ test("Basic requirements", function() {
ok( $, "$" );
});
-testIframeWithCallback( "Conditional compilation compatibility (#13274)", "core/cc_on.html", function( cc_on, errors, $ ) {
- expect( 3 );
- ok( true, "JScript conditional compilation " + ( cc_on ? "supported" : "not supported" ) );
- deepEqual( errors, [], "No errors" );
- ok( $(), "jQuery executes" );
-});
-
test("jQuery()", function() {
var elem, i,
@@ -1358,3 +1351,10 @@ test("jQuery.camelCase()", function() {
equal( jQuery.camelCase( key ), val, "Converts: " + key + " => " + val );
});
});
+
+testIframeWithCallback( "Conditional compilation compatibility (#13274)", "core/cc_on.html", function( cc_on, errors, $ ) {
+ expect( 3 );
+ ok( true, "JScript conditional compilation " + ( cc_on ? "supported" : "not supported" ) );
+ deepEqual( errors, [], "No errors" );
+ ok( $(), "jQuery executes" );
+});
diff --git a/test/unit/data.js b/test/unit/data.js
index eb1af3800..7f2ee43c7 100644
--- a/test/unit/data.js
+++ b/test/unit/data.js
@@ -6,7 +6,7 @@ test("expando", function(){
equal(jQuery.expando !== undefined, true, "jQuery is exposing the expando");
});
-function dataTests (elem) {
+function dataTests( elem ) {
var dataObj, internalDataObj;
equal( jQuery.data(elem, "foo"), undefined, "No data exists initially" );
@@ -73,30 +73,30 @@ function dataTests (elem) {
test("jQuery.data(div)", 25, function() {
var div = document.createElement("div");
- dataTests(div);
+ dataTests( div );
// We stored one key in the private data
// assert that nothing else was put in there, and that that
// one stayed there.
- QUnit.expectJqData(div, "foo");
+ QUnit.expectJqData( div, "foo" );
});
test("jQuery.data({})", 25, function() {
- dataTests({});
+ dataTests( {} );
});
test("jQuery.data(window)", 25, function() {
// remove bound handlers from window object to stop potential false positives caused by fix for #5280 in
// transports/xhr.js
- jQuery(window).off("unload");
+ jQuery( window ).off( "unload" );
- dataTests(window);
+ dataTests( window );
});
test("jQuery.data(document)", 25, function() {
- dataTests(document);
+ dataTests( document );
- QUnit.expectJqData(document, "foo");
+ QUnit.expectJqData( document, "foo" );
});
test("Expando cleanup", 4, function() {
diff --git a/test/unit/support.js b/test/unit/support.js
index 313b832a5..41d3aa320 100644
--- a/test/unit/support.js
+++ b/test/unit/support.js
@@ -12,13 +12,18 @@ test( "zoom of doom (#13089)", function() {
if ( jQuery.css ) {
testIframeWithCallback( "body background is not lost if set prior to loading jQuery (#9239)", "support/bodyBackground.html", function( color, support ) {
expect( 2 );
- var okValue = {
- "#000000": true,
- "rgb(0, 0, 0)": true
- };
+ var okValue = {
+ "#000000": true,
+ "rgb(0, 0, 0)": true
+ };
ok( okValue[ color ], "color was not reset (" + color + ")" );
- deepEqual( jQuery.extend( {}, support ), jQuery.support, "Same support properties" );
+ stop();
+ // Run doc ready tests as well
+ jQuery(function() {
+ deepEqual( jQuery.extend( {}, support ), jQuery.support, "Same support properties" );
+ start();
+ });
});
}