Skip to content

Commit

Permalink
Don't throw TypeError on memoized class component
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigopr committed Apr 1, 2019
1 parent 5334c7b commit abed5df
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1670,31 +1670,7 @@ describe('shallow', () => {
expect(wrapper.find('.qoo').text()).to.equal('qux');
});

it('throws with a class component', () => {
class InnerComp extends React.Component {
render() {
return <div><span>Hello</span></div>;
}
}

class Foo extends React.Component {
render() {
const { foo } = this.props;
return (
<div>
<InnerComp />
<div className="bar">bar</div>
<div className="qoo">{foo}</div>
</div>
);
}
}
const FooMemo = memo(Foo);

expect(() => shallow(<FooMemo foo="qux" />)).to.throw(TypeError);
});

it.skip('works with a class component', () => {
it('works with a class component', () => {
class InnerComp extends React.Component {
render() {
return <div><span>Hello</span></div>;
Expand Down

0 comments on commit abed5df

Please sign in to comment.