Skip to content

Commit 105a2aa

Browse files
author
Josh Story
committed
remove test for changing select prop as it no longer applies to new api
1 parent 170b1b7 commit 105a2aa

File tree

1 file changed

+0
-59
lines changed

1 file changed

+0
-59
lines changed

test/components/connect.spec.js

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -343,65 +343,6 @@ describe('React', () => {
343343
expect(spy.calls.length).toBe(3);
344344
});
345345

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-
405346
it('should throw an error if select, bindActionCreators, or merge returns anything but a plain object', () => {
406347
const store = createStore(() => ({}));
407348

0 commit comments

Comments
 (0)