testing: remove error simulation

This commit is contained in:
oscarzhou 2020-12-26 11:56:39 +13:00
parent 5c769c261b
commit cf3a7c97b2
2 changed files with 1 additions and 11 deletions

View File

@ -4,20 +4,11 @@ import Layout from './hoc/Layout/Layout';
import BurgerBuilder from './containers/BurgerBuilder/BurgerBuilder';
class App extends Component {
state = {
show: true
};
componentDidMount() {
setTimeout(() => {
this.setState({show: false});
}, 3000);
}
render() {
return (
<div>
<Layout>
{this.state.show ? <BurgerBuilder /> : null }
<BurgerBuilder />
</Layout>
</div>
);

View File

@ -21,7 +21,6 @@ const withErrorHandler = (WrappedComponent, axios) => {
}
componentWillUnmount() {
console.log('Will Unmount', this.reqInterceptor, this.resInterceptor);
axios.interceptors.request.eject(this.reqInterceptor);
axios.interceptors.response.eject(this.resInterceptor);
}