dillon1000/react

Commit

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.
Browse files
Changed paths1 file
First-parent comparison
M packages/react-dom/src/__tests__/refs-destruction-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…