Skip to content

Commit

Permalink
[Tests] temporarily allow class components with memo to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Feb 26, 2019
1 parent 13cff52 commit 6b3274b
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,31 @@ describe('shallow', () => {
expect(wrapper.find('.qoo').text()).to.equal('qux');
});

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

0 comments on commit 6b3274b

Please sign in to comment.