Skip to content

Commit

Permalink
In tests replace string refs with function refs retaining the instanc…
Browse files Browse the repository at this point in the history
…e after the unmount
  • Loading branch information
errendir committed Feb 14, 2019
1 parent ac15233 commit 054ca40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/Transition-test.js
Expand Up @@ -264,7 +264,7 @@ describe('Transition', () => {

return (
<Transition
ref="transition"
ref={transition => this.transition = this.transition || transition}
mountOnEnter
in={this.state.in}
timeout={10}
Expand All @@ -276,7 +276,7 @@ describe('Transition', () => {
}

getStatus = () => {
return this.refs.transition.state.status
return this.transition.state.status
}
}

Expand Down Expand Up @@ -337,7 +337,7 @@ describe('Transition', () => {

return (
<Transition
ref="transition"
ref={transition => this.transition = this.transition || transition}
unmountOnExit
in={this.state.in}
timeout={10}
Expand All @@ -349,7 +349,7 @@ describe('Transition', () => {
}

getStatus = () => {
return this.refs.transition.state.status
return this.transition.state.status
}
}

Expand Down

0 comments on commit 054ca40

Please sign in to comment.