From bc383365cd0d13939818d062354e0eb776b70323 Mon Sep 17 00:00:00 2001 From: bwain Date: Fri, 26 Jun 2020 10:36:59 -0500 Subject: [PATCH] Add failing test for isMemo bug (#2390) --- packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx b/packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx index 885ee86d1..4dca32483 100644 --- a/packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx +++ b/packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx @@ -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, @@ -1722,6 +1723,11 @@ describe('shallow', () => { `); expect(() => wrapper.dive().dive()).to.throw(TypeError); }); + + it('is still marked as memoized after going through the wrapper', () => { + const wrapper = shallow(); + expect(isMemo(wrapper.get(0))).toBe(true); + }); }); });