aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/data.js
diff options
context:
space:
mode:
authorOleg Gaidarenko <markelog@gmail.com>2015-07-29 18:10:04 +0300
committerOleg Gaidarenko <markelog@gmail.com>2015-07-30 20:46:31 +0300
commitaabe94edb4880c75eeebc5b5b5d66a9ad17008fe (patch)
tree41f685d530ab14485218cdec7d9c021390f0aa39 /test/unit/data.js
parent360a4780339b7f412b75ad8a06dca7f39616f654 (diff)
downloadjquery-aabe94edb4880c75eeebc5b5b5d66a9ad17008fe.tar.gz
jquery-aabe94edb4880c75eeebc5b5b5d66a9ad17008fe.zip
Tests: don't use deprecated argument in test declaration
Closes gh-2507
Diffstat (limited to 'test/unit/data.js')
-rw-r--r--test/unit/data.js32
1 files changed, 24 insertions, 8 deletions
diff --git a/test/unit/data.js b/test/unit/data.js
index 20e5af828..f86704dda 100644
--- a/test/unit/data.js
+++ b/test/unit/data.js
@@ -126,7 +126,9 @@ function dataTests( elem ) {
equal( jQuery._data(elem, "foo"), "foo2", "(sanity check) jQuery.removeData for user data does not remove internal data" );
}
-test("jQuery.data(div)", 25, function() {
+test("jQuery.data(div)", function() {
+ expect( 25 );
+
var div = document.createElement("div");
dataTests( div );
@@ -137,11 +139,15 @@ test("jQuery.data(div)", 25, function() {
QUnit.expectJqData( this, div, "foo" );
});
-test("jQuery.data({})", 25, function() {
+test("jQuery.data({})", function() {
+ expect( 25 );
+
dataTests( {} );
});
-test("jQuery.data(window)", 25, function() {
+test("jQuery.data(window)", function() {
+ expect( 25 );
+
// remove bound handlers from window object to stop potential false positives caused by fix for #5280 in
// transports/xhr.js
jQuery( window ).off( "unload" );
@@ -149,17 +155,23 @@ test("jQuery.data(window)", 25, function() {
dataTests( window );
});
-test("jQuery.data(document)", 25, function() {
+test("jQuery.data(document)", function() {
+ expect( 25 );
+
dataTests( document );
QUnit.expectJqData( this, document, "foo" );
});
-test("jQuery.data(<embed>)", 25, function() {
+test("jQuery.data(<embed>)", function() {
+ expect( 25 );
+
dataTests( document.createElement("embed") );
});
-test("jQuery.data(object/flash)", 25, function() {
+test("jQuery.data(object/flash)", function() {
+ expect( 25 );
+
var flash = document.createElement("object");
flash.setAttribute( "classid", "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" );
@@ -167,7 +179,9 @@ test("jQuery.data(object/flash)", 25, function() {
});
// attempting to access the data of an undefined jQuery element should be undefined
-test("jQuery().data() === undefined (#14101)", 2, function() {
+test("jQuery().data() === undefined (#14101)", function() {
+ expect( 2 );
+
strictEqual(jQuery().data(), undefined);
strictEqual(jQuery().data("key"), undefined);
});
@@ -826,7 +840,9 @@ test("jQuery.acceptData", function() {
"form with aliased DOM properties" );
});
-test("Check proper data removal of non-element descendants nodes (#8335)", 1, function() {
+test("Check proper data removal of non-element descendants nodes (#8335)", function() {
+ expect( 1 );
+
var div = jQuery("<div>text</div>"),
text = div.contents();