Skip to content

Commit ecb3fe2

Browse files
committed
use compat helper
1 parent 2ae2d93 commit ecb3fe2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/enzyme-test-suite/test/ReactWrapper-spec.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
import { ITERATOR_SYMBOL, sym } from 'enzyme/build/Utils';
1212

1313
import './_helpers/setupAdapters';
14-
import { createClass, createContext, createPortal } from './_helpers/react-compat';
14+
import { createClass, createContext, createPortal, forwardRef } from './_helpers/react-compat';
1515
import {
1616
describeWithDOM,
1717
describeIf,
@@ -186,7 +186,7 @@ describeWithDOM('mount', () => {
186186
it('should mount without complaint', () => {
187187
const warningStub = sinon.stub(console, 'error');
188188

189-
const SomeComponent = React.forwardRef((props, ref) => (
189+
const SomeComponent = forwardRef((props, ref) => (
190190
<div {...props} ref={ref} />
191191
));
192192

@@ -199,7 +199,7 @@ describeWithDOM('mount', () => {
199199

200200
it('should find elements through forwardedRef elements', () => {
201201
const testRef = () => {};
202-
const SomeComponent = React.forwardRef((props, ref) => (
202+
const SomeComponent = forwardRef((props, ref) => (
203203
<div ref={ref}>
204204
<span className="child1" />
205205
<span className="child2" />

packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ describe('shallow', () => {
122122
});
123123

124124
itIf(REACT163, 'should find elements through forwardedRef elements', () => {
125-
const SomeComponent = React.forwardRef((props, ref) => (
125+
const SomeComponent = forwardRef((props, ref) => (
126126
<div ref={ref}>
127127
<span className="child1" />
128128
<span className="child2" />

0 commit comments

Comments
 (0)