Skip to content

Commit

Permalink
Add failing test for isMemo bug (#2390)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdwain committed May 9, 2021
1 parent f046079 commit 42d5f9e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx
Expand Up @@ -4,6 +4,7 @@ import { expect } from 'chai';
import sinon from 'sinon-sandbox';
import wrap from 'mocha-wrap';
import inspect from 'object-inspect';
import { isMemo } from 'react-is';

import {
shallow,
Expand Down Expand Up @@ -1731,6 +1732,11 @@ describe('shallow', () => {
</div>`);
expect(() => wrapper.dive().dive()).to.throw(TypeError);
});

it('is still marked as memoized after going through the wrapper', () => {
const wrapper = shallow(<RendersAppMemoized />);
expect(isMemo(wrapper.get(0))).to.equal(true);
});
});
});

Expand Down

0 comments on commit 42d5f9e

Please sign in to comment.