Browse Source

Remove deprecated componentWillMount test

master
Luke Childs 7 years ago
parent
commit
233a59b427
  1. 10
      test/react-jsdom.js

10
test/react-jsdom.js

@ -10,12 +10,6 @@ class TestComponent extends React.Component {
return <div>hi</div>; return <div>hi</div>;
} }
componentWillMount() {
if (typeof this.props.componentWillMount === 'function') {
this.props.componentWillMount();
}
}
componentDidMount() { componentDidMount() {
if (typeof this.props.componentDidMount === 'function') { if (typeof this.props.componentDidMount === 'function') {
this.props.componentDidMount(); this.props.componentDidMount();
@ -49,10 +43,6 @@ test('ReactJSDOM allows window instance to be passed in', t => {
t.is(elem.textContent, 'hi'); t.is(elem.textContent, 'hi');
}); });
test('componentWillMount fires', t => {
ReactJSDOM.render(<TestComponent componentWillMount={() => t.pass()}/>);
});
test('componentDidMount fires', t => { test('componentDidMount fires', t => {
ReactJSDOM.render(<TestComponent componentDidMount={() => t.pass()}/>); ReactJSDOM.render(<TestComponent componentDidMount={() => t.pass()}/>);
}); });

Loading…
Cancel
Save