@@ -343,65 +343,6 @@ describe('React', () => {
343
343
expect ( spy . calls . length ) . toBe ( 3 ) ;
344
344
} ) ;
345
345
346
- it ( 'should recompute the state slice when the select prop changes' , ( ) => {
347
- const store = createStore ( combineReducers ( {
348
- a : ( ) => 42 ,
349
- b : ( ) => 72
350
- } ) ) ;
351
-
352
- function selectA ( state ) {
353
- return { result : state . a } ;
354
- }
355
-
356
- function selectB ( state ) {
357
- return { result : state . b } ;
358
- }
359
-
360
- function render ( { result } ) {
361
- return < div > { result } </ div > ;
362
- }
363
-
364
- function getContainer ( select ) {
365
- return (
366
- @connect ( select )
367
- class Container extends Component {
368
- render ( ) {
369
- return this . props . children ( this . props ) ;
370
- }
371
- }
372
- ) ;
373
- }
374
-
375
- class OuterContainer extends Component {
376
- constructor ( ) {
377
- super ( ) ;
378
- this . state = { select : selectA } ;
379
- }
380
-
381
- render ( ) {
382
- return (
383
- < Provider store = { store } >
384
- { ( ) => {
385
- const Container = getContainer ( this . state . select ) ;
386
- return (
387
- < Container >
388
- { render }
389
- </ Container >
390
- ) ;
391
- } }
392
- </ Provider >
393
- ) ;
394
- }
395
- }
396
-
397
- let tree = TestUtils . renderIntoDocument ( < OuterContainer /> ) ;
398
- let div = TestUtils . findRenderedDOMComponentWithTag ( tree , 'div' ) ;
399
- expect ( div . props . children ) . toBe ( 42 ) ;
400
-
401
- tree . setState ( { select : selectB } ) ;
402
- expect ( div . props . children ) . toBe ( 72 ) ;
403
- } ) ;
404
-
405
346
it ( 'should throw an error if select, bindActionCreators, or merge returns anything but a plain object' , ( ) => {
406
347
const store = createStore ( ( ) => ( { } ) ) ;
407
348
0 commit comments