Followup: remove dead test code from #30346 (#31415)
I missed that this was a constant false check when making the broader cleanup changes in https://github.com/facebook/react/pull/30346
Jan Kassens committed
Nov 6, 2024 at 08:58 UTC
3dc1e4820ec985baa6668a4fa799760c4b99f5d9
1 file changed
-6
packages/react/src/__tests__/ReactElementClone-test.js
-6
@@ -273,9 +273,6 @@ describe('ReactElementClone', () => {
273
if (gate(flags => flags.disableStringRefs)) {
274
expect(component.childRef).toEqual({current: null});
275
expect(component.parentRef.current.xyzRef.current.tagName).toBe('SPAN');
276
- } else if (gate(flags => false)) {
277
- expect(component.childRef).toEqual({current: null});
278
- expect(component.parentRef.current.xyzRef.current.tagName).toBe('SPAN');
276
} else if (gate(flags => !flags.disableStringRefs)) {
277
expect(component.childRef).toEqual({current: null});
278
expect(component.parentRef.current.xyzRef.current.tagName).toBe('SPAN');
@@ -413,9 +410,6 @@ describe('ReactElementClone', () => {
410
{withoutStack: true},
411
);
412
expect(clone.props).toEqual({foo: 'ef', ref: '34'});
416
- } else if (gate(flags => false)) {
417
- expect(clone.ref).toBe(element.ref);
418
- expect(clone.props).toEqual({foo: 'ef'});
413
} else if (gate(flags => !flags.disableStringRefs)) {
414
expect(() => {
415
expect(clone.ref).toBe(element.ref);