Skip to content

Commit

Permalink
remove memo test
Browse files Browse the repository at this point in the history
  • Loading branch information
hanq08 committed Apr 18, 2020
1 parent 68408a4 commit 51a00f0
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions packages/react-reconciler/src/__tests__/ReactMemo-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,21 +497,5 @@ describe('memo', () => {
expect(root).toMatchRenderedOutput('1');
});
});

it('inner component of react memo should have _debugOwner set', async () => {
const InComponent = React.forwardRef((props, ref) => <div ref={ref} />);
const Outer = React.memo(InComponent);
const App = () => {
const ref = React.createRef();
return <Outer ref={ref}>Click me! </Outer>;
};
ReactNoop.render(<App />);
expect(Scheduler).toFlushWithoutYielding();
const innerFiber = ReactNoop.getRoot().current.child.child.child;
const innerFiberOwner = innerFiber._debugOwner;
expect(innerFiber.type.$$typeof).toBe(Symbol.for('react.forward_ref'));
expect(innerFiberOwner).not.toBeNull();
expect(innerFiberOwner.type.$$typeof).toBe(Symbol.for('react.memo'));
});
}
});

0 comments on commit 51a00f0

Please sign in to comment.