@@ -739,9 +739,12 @@ describe('ReactDOMInput', () => {
739739 const cNode = stub . refs . c ;
740740
741741 expect ( aNode . checked ) . toBe ( true ) ;
742+ expect ( aNode . getAttribute ( 'checked' ) ) . toBe ( '' ) ;
742743 expect ( bNode . checked ) . toBe ( false ) ;
744+ expect ( bNode . getAttribute ( 'checked' ) ) . toBe ( null ) ;
743745 // c is in a separate form and shouldn't be affected at all here
744746 expect ( cNode . checked ) . toBe ( true ) ;
747+ expect ( cNode . getAttribute ( 'checked' ) ) . toBe ( '' ) ;
745748
746749 bNode . checked = true ;
747750 // This next line isn't necessary in a proper browser environment, but
@@ -750,6 +753,11 @@ describe('ReactDOMInput', () => {
750753 aNode . checked = false ;
751754 expect ( cNode . checked ) . toBe ( true ) ;
752755
756+ // The original 'checked' attribute should be unchanged
757+ expect ( aNode . getAttribute ( 'checked' ) ) . toBe ( '' ) ;
758+ expect ( bNode . getAttribute ( 'checked' ) ) . toBe ( null ) ;
759+ expect ( cNode . getAttribute ( 'checked' ) ) . toBe ( '' ) ;
760+
753761 // Now let's run the actual ReactDOMInput change event handler
754762 ReactTestUtils . Simulate . change ( bNode ) ;
755763
@@ -1324,7 +1332,6 @@ describe('ReactDOMInput', () => {
13241332 'set property value' ,
13251333 'set attribute value' ,
13261334 'set attribute checked' ,
1327- 'set attribute checked' ,
13281335 ] ) ;
13291336 } ) ;
13301337
@@ -1389,7 +1396,6 @@ describe('ReactDOMInput', () => {
13891396 'node.value = "1980-01-01"' ,
13901397 'node.setAttribute("value", "1980-01-01")' ,
13911398 'node.setAttribute("checked", "")' ,
1392- 'node.setAttribute("checked", "")' ,
13931399 ] ) ;
13941400 } ) ;
13951401
0 commit comments