Commit f964825
committed
Amend tests and move onInputChange call
onInputChange is now called from `handleInputChange`, which is less
surprising than `componentDidUpdate`, and should stop the double render,
and hence the flash of typed content, as opposed to what is returned
from `onInputChange`.
Simplified the tests by using the existing `createComponentWithWrapper`
function, and using a stub. This should make the tests clearer.
Added a couple of tests for returning different things (e.g. null,
numbers), and one to check the new value is actually rendered in the
DOM.1 parent 4e87373 commit f964825
2 files changed
+37
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | 174 | | |
182 | 175 | | |
183 | 176 | | |
| |||
347 | 340 | | |
348 | 341 | | |
349 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
353 | | - | |
| 354 | + | |
354 | 355 | | |
355 | 356 | | |
356 | 357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 130 | | |
156 | 131 | | |
157 | 132 | | |
| |||
408 | 383 | | |
409 | 384 | | |
410 | 385 | | |
| 386 | + | |
| 387 | + | |
411 | 388 | | |
412 | 389 | | |
413 | 390 | | |
414 | 391 | | |
415 | 392 | | |
416 | 393 | | |
417 | 394 | | |
418 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
419 | 398 | | |
420 | 399 | | |
421 | 400 | | |
422 | 401 | | |
| 402 | + | |
423 | 403 | | |
424 | 404 | | |
425 | 405 | | |
426 | 406 | | |
| 407 | + | |
427 | 408 | | |
428 | 409 | | |
429 | 410 | | |
430 | 411 | | |
431 | | - | |
| 412 | + | |
| 413 | + | |
432 | 414 | | |
433 | 415 | | |
434 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
435 | 436 | | |
436 | 437 | | |
437 | 438 | | |
| |||
0 commit comments