From 0cdc9dfdf0c94ff30e8892514087cd765b1ae144 Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Mon, 3 Jul 2023 07:45:51 +0200 Subject: [PATCH] this was fixed by #4054 (#4058) --- test/browser/refs.test.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/test/browser/refs.test.js b/test/browser/refs.test.js index a69b846239..7e4224af57 100644 --- a/test/browser/refs.test.js +++ b/test/browser/refs.test.js @@ -509,25 +509,23 @@ describe('refs', () => { expect(ref.current).to.equal(scratch.firstChild.firstChild); }); - // TODO - it.skip('should properly call null for memoized components keyed', () => { - const calls = []; + it('should properly call null for memoized components keyed', () => { + let calls = []; const element =
calls.push(x)}>hey
; function App(props) { return
{element}
; } render(, scratch); + expect(calls).to.deep.equal([scratch.firstChild.firstChild]); + calls = []; + render(, scratch); + expect(calls).to.deep.equal([null, scratch.firstChild.firstChild]); + calls = []; + render(, scratch); - expect(calls.length).to.equal(5); - expect(calls).to.deep.equal([ - scratch.firstChild.firstChild, - null, - scratch.firstChild.firstChild, - null, - scratch.firstChild.firstChild - ]); + expect(calls).to.deep.equal([null, scratch.firstChild.firstChild]); }); it('should properly call null for memoized components unkeyed', () => {