dillon1000/react
Commit
Browse files Remove ReactTestUtils from refs-destruction-test (#28532)
```diff -expect(ReactTestUtils.isDOMComponent(maybeElement)).toBe(true); +expect(maybeElement).toBeInstanceOf(Element); ``` It's not equivalent since `isDOMComponent` checks `maybeElement.nodeType === Element.ELEMENT_NODE && !!maybeElement.tagName` but `instanceof` check seems sufficient here. Checking `nodeType` is mostly for cross-realm checks and checking falsy `tagName` seems like a check specifically for incomplete DOM implementations because tagName can't be empty by spec I believe.
Changed paths1 file
First-parent comparisonpackages/react-dom/src/__tests__/refs-destruction-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…