From 9bf8b040d3ec99018904c792d3c06cb1b5b222f3 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Sat, 2 Mar 2013 13:07:07 -0500 Subject: [PATCH] test/unit/data.js style nits Signed-off-by: Rick Waldron --- test/unit/data.js | 20 +++++++++++--------- 1 file 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("
").appendTo("#qunit-fixture"); + var a, b; - div1.attr( "data-long-param", "test" ); - div1.data( "long-param", { a: 2 }); + a = jQuery("
").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("
").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("
").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() { -- 2.39.5