Skip to content

Commit bc38336

Browse files
committed
Add failing test for isMemo bug (#2390)
1 parent f8a9ea0 commit bc38336

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import sinon from 'sinon-sandbox';
55
import wrap from 'mocha-wrap';
66
import isEqual from 'lodash.isequal';
77
import inspect from 'object-inspect';
8+
import { isMemo } from 'react-is';
89

910
import {
1011
shallow,
@@ -1722,6 +1723,11 @@ describe('shallow', () => {
17221723
</div>`);
17231724
expect(() => wrapper.dive().dive()).to.throw(TypeError);
17241725
});
1726+
1727+
it('is still marked as memoized after going through the wrapper', () => {
1728+
const wrapper = shallow(<RendersAppMemoized />);
1729+
expect(isMemo(wrapper.get(0))).toBe(true);
1730+
});
17251731
});
17261732
});
17271733

0 commit comments

Comments
 (0)