@@ -50,7 +50,7 @@ describe('ReactDOMTextarea', function() {
50
50
51
51
// Changing `defaultValue` should change if no value set.
52
52
renderTextarea ( < textarea defaultValue = "gorilla" /> , container , true ) ;
53
- expect ( node . value ) . toEqual ( 'gorilla ' ) ;
53
+ expect ( node . value ) . toEqual ( 'giraffe ' ) ;
54
54
55
55
node . value = 'cat' ;
56
56
@@ -163,27 +163,27 @@ describe('ReactDOMTextarea', function() {
163
163
it ( 'should take updates to `defaultValue` for uncontrolled textarea' , function ( ) {
164
164
var container = document . createElement ( 'div' ) ;
165
165
166
- var node = ReactDOM . render ( < textarea type = "text" defaultValue = "0" /> , container ) ;
166
+ var node = ReactDOM . render ( < textarea defaultValue = "0" /> , container ) ;
167
167
168
168
expect ( node . value ) . toBe ( '0' ) ;
169
169
170
- ReactDOM . render ( < textarea type = "text" defaultValue = "1" /> , container ) ;
170
+ ReactDOM . render ( < textarea defaultValue = "1" /> , container ) ;
171
171
172
- expect ( node . value ) . toBe ( '1 ' ) ;
172
+ expect ( node . value ) . toBe ( '0 ' ) ;
173
173
} ) ;
174
174
175
175
it ( 'should take updates to children in lieu of `defaultValue` for uncontrolled textarea' , function ( ) {
176
176
var container = document . createElement ( 'div' ) ;
177
177
178
- var node = ReactDOM . render ( < textarea type = "text" defaultValue = "0" /> , container ) ;
178
+ var node = ReactDOM . render ( < textarea defaultValue = "0" /> , container ) ;
179
179
180
180
expect ( node . value ) . toBe ( '0' ) ;
181
181
182
182
spyOn ( console , 'error' ) ; // deprecation warning for `children` content
183
183
184
- ReactDOM . render ( < textarea type = "text" > 1</ textarea > , container ) ;
184
+ ReactDOM . render ( < textarea > 1</ textarea > , container ) ;
185
185
186
- expect ( node . value ) . toBe ( '1 ' ) ;
186
+ expect ( node . value ) . toBe ( '0 ' ) ;
187
187
} ) ;
188
188
189
189
it ( 'should not incur unnecessary DOM mutations' , function ( ) {
@@ -230,7 +230,7 @@ describe('ReactDOMTextarea', function() {
230
230
231
231
// Changing children should cause value to change (new behavior of `defaultValue`)
232
232
stub = ReactDOM . render ( < textarea > gorilla</ textarea > , container ) ;
233
- expect ( node . value ) . toEqual ( 'gorilla ' ) ;
233
+ expect ( node . value ) . toEqual ( 'giraffe ' ) ;
234
234
} ) ;
235
235
236
236
it ( 'should not keep value when switching to uncontrolled element if not changed' , function ( ) {
@@ -242,7 +242,7 @@ describe('ReactDOMTextarea', function() {
242
242
243
243
ReactDOM . render ( < textarea defaultValue = "gorilla" > </ textarea > , container ) ;
244
244
245
- expect ( node . value ) . toEqual ( 'gorilla ' ) ;
245
+ expect ( node . value ) . toEqual ( 'kitten ' ) ;
246
246
} ) ;
247
247
248
248
it ( 'should keep value when switching to uncontrolled element if changed' , function ( ) {
0 commit comments