diff --git a/src/ReactWrapperComponent.jsx b/src/ReactWrapperComponent.jsx index 520f5201d..a599be69d 100644 --- a/src/ReactWrapperComponent.jsx +++ b/src/ReactWrapperComponent.jsx @@ -34,7 +34,7 @@ export default function createWrapperComponent(node, options = {}) { setChildProps(newProps) { const props = objectAssign({}, this.state.props, newProps); - return new Promise(resolve => this.setState({ props }, resolve)); + this.setState({ props }); }, setChildContext(context) { diff --git a/src/__tests__/ReactWrapper-spec.js b/src/__tests__/ReactWrapper-spec.js index 827bb4abc..f322a79ea 100644 --- a/src/__tests__/ReactWrapper-spec.js +++ b/src/__tests__/ReactWrapper-spec.js @@ -508,6 +508,35 @@ describeWithDOM('mount', () => { expect(wrapper.props().d).to.equal('e'); }); + it('should throw if an exception occurs during render', () => { + class Trainwreck extends React.Component { + render() { + const { user } = this.props; + return ( +