Skip to content

Commit ea5761b

Browse files
authored
Merge pull request #456 from errendir/swap-refs-in-tests
Don't use string refs in tests
2 parents ac15233 + 054ca40 commit ea5761b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/Transition-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ describe('Transition', () => {
264264

265265
return (
266266
<Transition
267-
ref="transition"
267+
ref={transition => this.transition = this.transition || transition}
268268
mountOnEnter
269269
in={this.state.in}
270270
timeout={10}
@@ -276,7 +276,7 @@ describe('Transition', () => {
276276
}
277277

278278
getStatus = () => {
279-
return this.refs.transition.state.status
279+
return this.transition.state.status
280280
}
281281
}
282282

@@ -337,7 +337,7 @@ describe('Transition', () => {
337337

338338
return (
339339
<Transition
340-
ref="transition"
340+
ref={transition => this.transition = this.transition || transition}
341341
unmountOnExit
342342
in={this.state.in}
343343
timeout={10}
@@ -349,7 +349,7 @@ describe('Transition', () => {
349349
}
350350

351351
getStatus = () => {
352-
return this.refs.transition.state.status
352+
return this.transition.state.status
353353
}
354354
}
355355

0 commit comments

Comments
 (0)