Revert "Data: camelCasing should not ignore case"

This reverts commit cf16f860b0.
This commit is contained in:
Oleg Gaidarenko 2015-12-22 16:24:23 +03:00
parent c43ea04c54
commit 4e0c67d6df
2 changed files with 1 additions and 20 deletions

View File

@ -29,7 +29,7 @@ var
// Matches dashed string for camelizing // Matches dashed string for camelizing
rmsPrefix = /^-ms-/, rmsPrefix = /^-ms-/,
rdashAlpha = /-([a-z])/g, rdashAlpha = /-([a-z])/gi,
// Used by jQuery.camelCase as callback to replace() // Used by jQuery.camelCase as callback to replace()
fcamelCase = function( all, letter ) { fcamelCase = function( all, letter ) {

View File

@ -882,25 +882,6 @@ 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( QUnit.test(
".data supports interoperable hyphenated/camelCase get/set of" + ".data supports interoperable hyphenated/camelCase get/set of" +
" properties with arbitrary non-null|NaN|undefined values", " properties with arbitrary non-null|NaN|undefined values",