mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Revert "Data: camelCasing should not ignore case"
This reverts commit 172cad80ac
.
This commit is contained in:
parent
3a98c4ab27
commit
41ebc4096d
@ -28,7 +28,7 @@ var
|
||||
|
||||
// Matches dashed string for camelizing
|
||||
rmsPrefix = /^-ms-/,
|
||||
rdashAlpha = /-([a-z])/g,
|
||||
rdashAlpha = /-([a-z])/gi,
|
||||
|
||||
// Used by jQuery.camelCase as callback to replace()
|
||||
fcamelCase = function( all, letter ) {
|
||||
|
@ -629,18 +629,7 @@ QUnit.test( ".data always sets data with the camelCased key (gh-2257)", function
|
||||
} );
|
||||
} );
|
||||
|
||||
QUnit.test( ".data should not strip more than one hyphen when camelCasing (gh-2070)", function( assert ) {
|
||||
assert.expect( 3 );
|
||||
var div = jQuery( "<div data-nested-single='single' data-nested--double='double' data-nested---triple='triple'></div>" ).appendTo( "#qunit-fixture" ),
|
||||
allData = div.data();
|
||||
|
||||
assert.equal( allData.nestedSingle, "single", "Key is correctly camelCased" );
|
||||
assert.equal( allData[ "nested-Double" ], "double", "Key with double hyphens is correctly camelCased" );
|
||||
assert.equal( allData[ "nested--Triple" ], "triple", "Key with triple hyphens is correctly camelCased" );
|
||||
} );
|
||||
|
||||
QUnit.test( ".data supports interoperable hyphenated/camelCase get/set of properties with arbitrary non-null|NaN|undefined values", function( assert ) {
|
||||
|
||||
QUnit.test(".data supports interoperable hyphenated/camelCase get/set of properties with arbitrary non-null|NaN|undefined values", function( assert ) {
|
||||
var div = jQuery( "<div/>", { id: "hyphened" } ).appendTo( "#qunit-fixture" ),
|
||||
datas = {
|
||||
"non-empty": "a string",
|
||||
|
Loading…
Reference in New Issue
Block a user