Skip to content

Commit

Permalink
Fix lint errors in test/browser/lifecycle.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rpetrich committed Aug 22, 2017
1 parent a036c19 commit 10bd841
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/browser/lifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ describe('Lifecycle methods', () => {
it('should be called when child fails in constructor', () => {
class ErrorReceiverComponent extends Component {
componentDidCatch(error) {
this.setState({ "error": error });
this.setState({ error });
}
render() {
return <div>{this.state.error ? String(this.state.error) : this.props.children}</div>;
Expand All @@ -480,7 +480,7 @@ describe('Lifecycle methods', () => {
it('should be called when child fails in componentWillMount', () => {
class ErrorReceiverComponent extends Component {
componentDidCatch(error) {
this.setState({ "error": error });
this.setState({ error });
}
render() {
return <div>{this.state.error ? String(this.state.error) : this.props.children}</div>;
Expand All @@ -499,7 +499,7 @@ describe('Lifecycle methods', () => {
it('should be called when child fails in render', () => {
class ErrorReceiverComponent extends Component {
componentDidCatch(error) {
this.setState({ "error": error });
this.setState({ error });
}
render() {
return <div>{this.state.error ? String(this.state.error) : this.props.children}</div>;
Expand All @@ -518,7 +518,7 @@ describe('Lifecycle methods', () => {
it('should be called when child fails in componentDidMount', () => {
class ErrorReceiverComponent extends Component {
componentDidCatch(error) {
this.setState({ "error": error });
this.setState({ error });
}
render() {
return <div>{this.state.error ? String(this.state.error) : this.props.children}</div>;
Expand All @@ -537,7 +537,7 @@ describe('Lifecycle methods', () => {
it('should be called when functional child fails', () => {
class ErrorReceiverComponent extends Component {
componentDidCatch(error) {
this.setState({ "error": error });
this.setState({ error });
}
render() {
return <div>{this.state.error ? String(this.state.error) : this.props.children}</div>;
Expand All @@ -554,7 +554,7 @@ describe('Lifecycle methods', () => {
it('should re-render with new content', () => {
class ErrorReceiverComponent extends Component {
componentDidCatch(error) {
this.setState({ "error": error });
this.setState({ error });
}
render() {
return <span>{this.state.error ? String(this.state.error) : this.props.children}</span>;
Expand All @@ -576,7 +576,7 @@ describe('Lifecycle methods', () => {
it('should be able to adapt and rethrow errors', () => {
class ErrorReceiverComponent extends Component {
componentDidCatch(error) {
this.setState({ "error": error });
this.setState({ error });
}
render() {
return <div>{this.state.error ? String(this.state.error) : this.props.children}</div>;
Expand Down

0 comments on commit 10bd841

Please sign in to comment.