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
This commit is contained in:
Jan Kassens
2024-11-06 08:58:36 -05:00
committed by GitHub
parent b65515767c
commit a47d782b8c
@@ -273,9 +273,6 @@ describe('ReactElementClone', () => {
if (gate(flags => flags.disableStringRefs)) {
expect(component.childRef).toEqual({current: null});
expect(component.parentRef.current.xyzRef.current.tagName).toBe('SPAN');
} else if (gate(flags => false)) {
expect(component.childRef).toEqual({current: null});
expect(component.parentRef.current.xyzRef.current.tagName).toBe('SPAN');
} else if (gate(flags => !flags.disableStringRefs)) {
expect(component.childRef).toEqual({current: null});
expect(component.parentRef.current.xyzRef.current.tagName).toBe('SPAN');
@@ -413,9 +410,6 @@ describe('ReactElementClone', () => {
{withoutStack: true},
);
expect(clone.props).toEqual({foo: 'ef', ref: '34'});
} else if (gate(flags => false)) {
expect(clone.ref).toBe(element.ref);
expect(clone.props).toEqual({foo: 'ef'});
} else if (gate(flags => !flags.disableStringRefs)) {
expect(() => {
expect(clone.ref).toBe(element.ref);