From 3b9ab63ffccdd947de5801d71247f8a269ec9909 Mon Sep 17 00:00:00 2001 From: bwain Date: Fri, 26 Jun 2020 10:44:20 -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..b739d1030 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))).to.equal(true); + }); }); });