@@ -258,8 +258,8 @@ describe('ReactDOMInput', () => {
258258 }
259259 }
260260
261- var stub = ReactTestUtils . renderIntoDocument ( < Stub /> ) ;
262- var node = ReactDOM . findDOMNode ( stub ) ;
261+ const stub = ReactTestUtils . renderIntoDocument ( < Stub /> ) ;
262+ const node = ReactDOM . findDOMNode ( stub ) ;
263263 stub . setState ( { value : 0 } ) ;
264264
265265 expect ( node . value ) . toEqual ( '0' ) ;
@@ -628,36 +628,36 @@ describe('ReactDOMInput', () => {
628628 } ) ;
629629
630630 it ( 'should properly transition a text input from 0 to an empty 0.0' , function ( ) {
631- var container = document . createElement ( 'div' ) ;
631+ const container = document . createElement ( 'div' ) ;
632632
633633 ReactDOM . render ( < input type = "text" value = { 0 } /> , container ) ;
634634 ReactDOM . render ( < input type = "text" value = "0.0" /> , container ) ;
635635
636- var node = container . firstChild ;
636+ const node = container . firstChild ;
637637
638638 expect ( node . value ) . toBe ( '0.0' ) ;
639639 expect ( node . defaultValue ) . toBe ( '0.0' ) ;
640640 } ) ;
641641
642642 it ( 'should properly transition a number input from "" to 0' , function ( ) {
643- var container = document . createElement ( 'div' ) ;
643+ const container = document . createElement ( 'div' ) ;
644644
645645 ReactDOM . render ( < input type = "number" value = "" /> , container ) ;
646646 ReactDOM . render ( < input type = "number" value = { 0 } /> , container ) ;
647647
648- var node = container . firstChild ;
648+ const node = container . firstChild ;
649649
650650 expect ( node . value ) . toBe ( '0' ) ;
651651 expect ( node . defaultValue ) . toBe ( '0' ) ;
652652 } ) ;
653653
654654 it ( 'should properly transition a number input from "" to "0"' , function ( ) {
655- var container = document . createElement ( 'div' ) ;
655+ const container = document . createElement ( 'div' ) ;
656656
657657 ReactDOM . render ( < input type = "number" value = "" /> , container ) ;
658658 ReactDOM . render ( < input type = "number" value = "0" /> , container ) ;
659659
660- var node = container . firstChild ;
660+ const node = container . firstChild ;
661661
662662 expect ( node . value ) . toBe ( '0' ) ;
663663 expect ( node . defaultValue ) . toBe ( '0' ) ;
@@ -1644,12 +1644,12 @@ describe('ReactDOMInput', () => {
16441644 describe ( 'When given a Symbol value' , function ( ) {
16451645 it ( 'treats initial Symbol value as an empty string' , function ( ) {
16461646 spyOnDev ( console , 'error' ) ;
1647- var container = document . createElement ( 'div' ) ;
1647+ const container = document . createElement ( 'div' ) ;
16481648 ReactDOM . render (
16491649 < input value = { Symbol ( 'foobar' ) } onChange = { ( ) => { } } /> ,
16501650 container ,
16511651 ) ;
1652- var node = container . firstChild ;
1652+ const node = container . firstChild ;
16531653
16541654 expect ( node . value ) . toBe ( '' ) ;
16551655 expect ( node . getAttribute ( 'value' ) ) . toBe ( '' ) ;
@@ -1664,13 +1664,13 @@ describe('ReactDOMInput', () => {
16641664
16651665 it ( 'treats updated Symbol value as an empty string' , function ( ) {
16661666 spyOnDev ( console , 'error' ) ;
1667- var container = document . createElement ( 'div' ) ;
1667+ const container = document . createElement ( 'div' ) ;
16681668 ReactDOM . render ( < input value = "foo" onChange = { ( ) => { } } /> , container ) ;
16691669 ReactDOM . render (
16701670 < input value = { Symbol ( 'foobar' ) } onChange = { ( ) => { } } /> ,
16711671 container ,
16721672 ) ;
1673- var node = container . firstChild ;
1673+ const node = container . firstChild ;
16741674
16751675 expect ( node . value ) . toBe ( '' ) ;
16761676 expect ( node . getAttribute ( 'value' ) ) . toBe ( '' ) ;
@@ -1684,20 +1684,20 @@ describe('ReactDOMInput', () => {
16841684 } ) ;
16851685
16861686 it ( 'treats initial Symbol defaultValue as an empty string' , function ( ) {
1687- var container = document . createElement ( 'div' ) ;
1687+ const container = document . createElement ( 'div' ) ;
16881688 ReactDOM . render ( < input defaultValue = { Symbol ( 'foobar' ) } /> , container ) ;
1689- var node = container . firstChild ;
1689+ const node = container . firstChild ;
16901690
16911691 expect ( node . value ) . toBe ( '' ) ;
16921692 expect ( node . getAttribute ( 'value' ) ) . toBe ( '' ) ;
16931693 // TODO: we should warn here.
16941694 } ) ;
16951695
16961696 it ( 'treats updated Symbol defaultValue as an empty string' , function ( ) {
1697- var container = document . createElement ( 'div' ) ;
1697+ const container = document . createElement ( 'div' ) ;
16981698 ReactDOM . render ( < input defaultValue = "foo" /> , container ) ;
16991699 ReactDOM . render ( < input defaultValue = { Symbol ( 'foobar' ) } /> , container ) ;
1700- var node = container . firstChild ;
1700+ const node = container . firstChild ;
17011701
17021702 expect ( node . value ) . toBe ( 'foo' ) ;
17031703 expect ( node . getAttribute ( 'value' ) ) . toBe ( '' ) ;
@@ -1708,12 +1708,12 @@ describe('ReactDOMInput', () => {
17081708 describe ( 'When given a function value' , function ( ) {
17091709 it ( 'treats initial function value as an empty string' , function ( ) {
17101710 spyOnDev ( console , 'error' ) ;
1711- var container = document . createElement ( 'div' ) ;
1711+ const container = document . createElement ( 'div' ) ;
17121712 ReactDOM . render (
17131713 < input value = { ( ) => { } } onChange = { ( ) => { } } /> ,
17141714 container ,
17151715 ) ;
1716- var node = container . firstChild ;
1716+ const node = container . firstChild ;
17171717
17181718 expect ( node . value ) . toBe ( '' ) ;
17191719 expect ( node . getAttribute ( 'value' ) ) . toBe ( '' ) ;
@@ -1728,13 +1728,13 @@ describe('ReactDOMInput', () => {
17281728
17291729 it ( 'treats updated function value as an empty string' , function ( ) {
17301730 spyOnDev ( console , 'error' ) ;
1731- var container = document . createElement ( 'div' ) ;
1731+ const container = document . createElement ( 'div' ) ;
17321732 ReactDOM . render ( < input value = "foo" onChange = { ( ) => { } } /> , container ) ;
17331733 ReactDOM . render (
17341734 < input value = { ( ) => { } } onChange = { ( ) => { } } /> ,
17351735 container ,
17361736 ) ;
1737- var node = container . firstChild ;
1737+ const node = container . firstChild ;
17381738
17391739 expect ( node . value ) . toBe ( '' ) ;
17401740 expect ( node . getAttribute ( 'value' ) ) . toBe ( '' ) ;
@@ -1748,20 +1748,20 @@ describe('ReactDOMInput', () => {
17481748 } ) ;
17491749
17501750 it ( 'treats initial function defaultValue as an empty string' , function ( ) {
1751- var container = document . createElement ( 'div' ) ;
1751+ const container = document . createElement ( 'div' ) ;
17521752 ReactDOM . render ( < input defaultValue = { ( ) => { } } /> , container ) ;
1753- var node = container . firstChild ;
1753+ const node = container . firstChild ;
17541754
17551755 expect ( node . value ) . toBe ( '' ) ;
17561756 expect ( node . getAttribute ( 'value' ) ) . toBe ( '' ) ;
17571757 // TODO: we should warn here.
17581758 } ) ;
17591759
17601760 it ( 'treats updated function defaultValue as an empty string' , function ( ) {
1761- var container = document . createElement ( 'div' ) ;
1761+ const container = document . createElement ( 'div' ) ;
17621762 ReactDOM . render ( < input defaultValue = "foo" /> , container ) ;
17631763 ReactDOM . render ( < input defaultValue = { ( ) => { } } /> , container ) ;
1764- var node = container . firstChild ;
1764+ const node = container . firstChild ;
17651765
17661766 expect ( node . value ) . toBe ( 'foo' ) ;
17671767 expect ( node . getAttribute ( 'value' ) ) . toBe ( '' ) ;
0 commit comments