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 Jun 26, 2020
1 parent f8a9ea0 commit bc38336
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import sinon from 'sinon-sandbox';
import wrap from 'mocha-wrap';
import isEqual from 'lodash.isequal';
import inspect from 'object-inspect';
import { isMemo } from 'react-is';

import {
shallow,
Expand Down Expand Up @@ -1722,6 +1723,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))).toBe(true);
});
});
});

Expand Down

0 comments on commit bc38336

Please sign in to comment.