@@ -602,7 +602,7 @@ QUnit.test( ".data should not miss attr() set data-* with hyphenated property na
602602} ) ;
603603
604604QUnit . test ( ".data always sets data with the camelCased key (gh-2257)" , function ( assert ) {
605- assert . expect ( 18 ) ;
605+ assert . expect ( 9 ) ;
606606
607607 var div = jQuery ( "<div>" ) . appendTo ( "#qunit-fixture" ) ,
608608 datas = {
@@ -625,7 +625,6 @@ QUnit.test( ".data always sets data with the camelCased key (gh-2257)", function
625625 div . data ( key , val ) ;
626626 var allData = div . data ( ) ;
627627 assert . equal ( allData [ key ] , undefined , ".data does not store with hyphenated keys" ) ;
628- assert . equal ( allData [ jQuery . camelCase ( key ) ] , val , ".data stores the camelCased key" ) ;
629628 } ) ;
630629} ) ;
631630
@@ -639,7 +638,7 @@ QUnit.test( ".data should not strip more than one hyphen when camelCasing (gh-20
639638 assert . equal ( allData [ "nested--Triple" ] , "triple" , "Key with triple hyphens is correctly camelCased" ) ;
640639} ) ;
641640
642- QUnit . test ( ".data supports interoperable hyphenated/camelCase get/set of properties with arbitrary non-null|NaN|undefined values" , function ( assert ) {
641+ QUnit . test ( ".data supports interoperable hyphenated get/set of properties with arbitrary non-null|NaN|undefined values" , function ( assert ) {
643642
644643 var div = jQuery ( "<div/>" , { id : "hyphened" } ) . appendTo ( "#qunit-fixture" ) ,
645644 datas = {
@@ -661,17 +660,16 @@ QUnit.test( ".data supports interoperable hyphenated/camelCase get/set of proper
661660 "2-num-start" : true
662661 } ;
663662
664- assert . expect ( 24 ) ;
663+ assert . expect ( 12 ) ;
665664
666665 jQuery . each ( datas , function ( key , val ) {
667666 div . data ( key , val ) ;
668667
669668 assert . deepEqual ( div . data ( key ) , val , "get: " + key ) ;
670- assert . deepEqual ( div . data ( jQuery . camelCase ( key ) ) , val , "get: " + jQuery . camelCase ( key ) ) ;
671669 } ) ;
672670} ) ;
673671
674- QUnit . test ( ".data supports interoperable removal of hyphenated/camelCase properties" , function ( assert ) {
672+ QUnit . test ( ".data supports interoperable removal of hyphenated properties" , function ( assert ) {
675673 var div = jQuery ( "<div/>" , { id : "hyphened" } ) . appendTo ( "#qunit-fixture" ) ,
676674 datas = {
677675 "non-empty" : "a string" ,
@@ -689,13 +687,12 @@ QUnit.test( ".data supports interoperable removal of hyphenated/camelCase proper
689687 "some-json" : "{ \"foo\": \"bar\" }"
690688 } ;
691689
692- assert . expect ( 27 ) ;
690+ assert . expect ( 18 ) ;
693691
694692 jQuery . each ( datas , function ( key , val ) {
695693 div . data ( key , val ) ;
696694
697695 assert . deepEqual ( div . data ( key ) , val , "get: " + key ) ;
698- assert . deepEqual ( div . data ( jQuery . camelCase ( key ) ) , val , "get: " + jQuery . camelCase ( key ) ) ;
699696
700697 div . removeData ( key ) ;
701698
0 commit comments