react
react copied to clipboard
Remove ReactTestUtils from refs-destruction-test
-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.
Comparing: 850fac4915864a487e7cb9ecae8a75dbac144174...b851dbfa7a5b5eea22f8dd73027037ae4dfb952f
Critical size changes
Includes critical production bundles, as well as any change greater than 2%:
| Name | +/- | Base | Current | +/- gzip | Base gzip | Current gzip |
|---|---|---|---|---|---|---|
| oss-stable/react-dom/cjs/react-dom.production.min.js | = | 177.10 kB | 177.10 kB | = | 55.20 kB | 55.20 kB |
| oss-experimental/react-dom/cjs/react-dom.production.min.js | = | 177.64 kB | 177.64 kB | = | 55.53 kB | 55.53 kB |
| facebook-www/ReactDOM-prod.classic.js | = | 594.34 kB | 594.34 kB | = | 104.96 kB | 104.96 kB |
| facebook-www/ReactDOM-prod.modern.js | = | 577.60 kB | 577.60 kB | = | 102.02 kB | 102.02 kB |
| test_utils/ReactAllWarnings.js | Deleted | 66.60 kB | 0.00 kB | Deleted | 16.28 kB | 0.00 kB |
Significant size changes
Includes any change greater than 0.2%:
Expand to show
| Name | +/- | Base | Current | +/- gzip | Base gzip | Current gzip |
|---|---|---|---|---|---|---|
| test_utils/ReactAllWarnings.js | Deleted | 66.60 kB | 0.00 kB | Deleted | 16.28 kB | 0.00 kB |
Generated by :no_entry_sign: dangerJS against b851dbfa7a5b5eea22f8dd73027037ae4dfb952f