aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2013-03-02 13:07:07 -0500
committerRick Waldron <waldron.rick@gmail.com>2013-03-02 13:07:07 -0500
commit9bf8b040d3ec99018904c792d3c06cb1b5b222f3 (patch)
treecff6f2b3abd29f1012d38e989e0e974daaa98492
parent761b96c3016e09613f356bd6070be04edec74d0f (diff)
downloadjquery-9bf8b040d3ec99018904c792d3c06cb1b5b222f3.tar.gz
jquery-9bf8b040d3ec99018904c792d3c06cb1b5b222f3.zip
test/unit/data.js style nits
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
-rw-r--r--test/unit/data.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/test/unit/data.js b/test/unit/data.js
index 7ab58be3c..d6f979984 100644
--- a/test/unit/data.js
+++ b/test/unit/data.js
@@ -517,20 +517,22 @@ test(".data should not miss preset data-* w/ hyphenated property names", functio
test(".data should not miss attr() set data-* with hyphenated property names", function() {
expect(2);
- var div1 = jQuery("<div/>").appendTo("#qunit-fixture");
+ var a, b;
- div1.attr( "data-long-param", "test" );
- div1.data( "long-param", { a: 2 });
+ a = jQuery("<div/>").appendTo("#qunit-fixture");
- deepEqual( div1.data("long-param"), { a: 2 }, "data with property long-param was found" );
+ a.attr( "data-long-param", "test" );
+ a.data( "long-param", { a: 2 });
- var div2 = jQuery("<div/>").appendTo("#qunit-fixture");
+ deepEqual( a.data("long-param"), { a: 2 }, "data with property long-param was found, 1" );
- div2.attr( "data-long-param", "test" );
- div2.data( "long-param" );
- div2.data( "long-param", { a: 2 });
+ b = jQuery("<div/>").appendTo("#qunit-fixture");
- deepEqual( div2.data("long-param"), { a: 2 }, "data with property long-param was found" );
+ b.attr( "data-long-param", "test" );
+ b.data( "long-param" );
+ b.data( "long-param", { a: 2 });
+
+ deepEqual( b.data("long-param"), { a: 2 }, "data with property long-param was found, 2" );
});
test("jQuery.data supports interoperable hyphenated/camelCase get/set of properties with arbitrary non-null|NaN|undefined values", function() {