Skip to content

Commit 42d5f9e

Browse files
committed
Add failing test for isMemo bug (#2390)
1 parent f046079 commit 42d5f9e

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
@@ -4,6 +4,7 @@ import { expect } from 'chai';
44
import sinon from 'sinon-sandbox';
55
import wrap from 'mocha-wrap';
66
import inspect from 'object-inspect';
7+
import { isMemo } from 'react-is';
78

89
import {
910
shallow,
@@ -1731,6 +1732,11 @@ describe('shallow', () => {
17311732
</div>`);
17321733
expect(() => wrapper.dive().dive()).to.throw(TypeError);
17331734
});
1735+
1736+
it('is still marked as memoized after going through the wrapper', () => {
1737+
const wrapper = shallow(<RendersAppMemoized />);
1738+
expect(isMemo(wrapper.get(0))).to.equal(true);
1739+
});
17341740
});
17351741
});
17361742

0 commit comments

Comments
 (0)