aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/data.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/data.js')
-rw-r--r--test/unit/data.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/unit/data.js b/test/unit/data.js
index 2eb48e742..cd8183fe1 100644
--- a/test/unit/data.js
+++ b/test/unit/data.js
@@ -497,7 +497,7 @@ test("jQuery.data should follow html5 specification regarding camel casing", fun
div.remove();
});
-test("jQuery.data should not miss data with preset hyphenated property names", function() {
+test(".data should not miss preset data-* w/ hyphenated property names", function() {
expect(2);
@@ -514,6 +514,17 @@ test("jQuery.data should not miss data with preset hyphenated property names", f
});
});
+test(".data should not miss attr() set data-* with hyphenated property names", function() {
+ expect(1);
+
+ var div = jQuery("<div/>").appendTo("#qunit-fixture");
+
+ div.attr( "data-long-param", "test" );
+ div.data( "long-param", { a: 2 });
+
+ deepEqual( div.data("long-param"), { a: 2 }, "data with property long-param was found" );
+});
+
test("jQuery.data supports interoperable hyphenated/camelCase get/set of properties with arbitrary non-null|NaN|undefined values", function() {
var div = jQuery("<div/>", { id: "hyphened" }).appendTo("#qunit-fixture"),