mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
* Implement component stack for some warnings in Fiber * Keep Fiber debug source up to date When an element changes, we should copy the source and owner again. Otherwise they can get stale since we're not reading them from the element. * Remove outdated TODOs from tests * Explicitly specify Fiber types to include in the stack Fixes an accidental omission when both source and owner are null but displayName exists. * Fix mised Stack+Fiber test to not expect extra warnings When we're in Fiber mode we don't actually expect that warning being printed. * Warn on passing different props to super() * Implement duplicate key warnings We keep known keys in a set in development. There is an annoying special case where we know we'll check it again because we break out of the loop early. One test in the tree hook regresses to the failing state because it checks that the tree hook works without a Set available, but we started using Set in this code. It is not essential and we can clean this up later when we decide how to deal with polyfills. * Move ReactTypeOfWork to src/shared It needs to be available both to Fiber and Isomorphic because the tree hook lives in Isomorphic but pretty-prints Fiber stack. * Add dev-only ReactDebugCurrentFiber for warnings The goal is to use ReactCurrentOwner less and rely on ReactDebugCurrentFiber for warning owner name and stack. * Make Stack invariant messages more consistent Fiber used a helper so two tests had the same phrasing. Stack also used a helper for most invariants but hardcoded a different phrase in one place. I changed that invariant message to use a helper which made it consistent with what it prints in Fiber. * Make CSSPropertyOperations use getCurrentFiberOwnerName() This gets mount-time CSS warnings to be printed. However update-time warnings are currently ignored because current fiber is not yet available during the commit phase. We also regress on HostOperation hook tests but this doesn't matter because it's only used by ReactPerf and it doesn't work with Fiber yet anyway. We'll have to think more about it later. * Set ReactDebugCurrentFiber during the commit phase This makes it available during updates, fixing the last failing test in CSSPropertyOperations. * Add DOM warnings by calling hooks directly It is not clear if the old hook system is worth it in its generic incarnation. For now I am just hooking it up to the DOMFiber renderer directly. * Add client-side counterparts for some warning tests This helps us track which warnings are really failing in Fiber, and which ones depend on SSR.
125 lines
5.2 KiB
Plaintext
125 lines
5.2 KiB
Plaintext
src/addons/transitions/__tests__/ReactTransitionGroup-test.js
|
|
* should warn for duplicated keys with component stack info
|
|
|
|
src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
|
|
* should not warn when server-side rendering `onScroll`
|
|
* warns on invalid nesting
|
|
* warns on invalid nesting at root
|
|
* warns nicely for table rows
|
|
* gives useful context in warnings
|
|
* should warn about incorrect casing on properties (ssr)
|
|
* should warn about incorrect casing on event handlers (ssr)
|
|
* should warn about class (ssr)
|
|
* should suggest property name if available (ssr)
|
|
|
|
src/renderers/dom/shared/__tests__/ReactMount-test.js
|
|
* should warn if mounting into dirty rendered markup
|
|
* should warn when mounting into document.body
|
|
* should account for escaping on a checksum mismatch
|
|
* should warn if render removes React-rendered children
|
|
* should warn if the unmounted node was rendered by another copy of React
|
|
|
|
src/renderers/dom/shared/__tests__/ReactMountDestruction-test.js
|
|
* should warn when unmounting a non-container root node
|
|
* should warn when unmounting a non-container, non-root node
|
|
|
|
src/renderers/dom/shared/__tests__/ReactServerRendering-test.js
|
|
* should have the correct mounting behavior
|
|
|
|
src/renderers/shared/hooks/__tests__/ReactComponentTreeHook-test.js
|
|
* uses displayName or Unknown for classic components
|
|
* uses displayName, name, or ReactComponent for modern components
|
|
* uses displayName, name, or Object for factory components
|
|
* uses displayName, name, or StatelessComponent for functional components
|
|
* reports a host tree correctly
|
|
* reports a simple tree with composites correctly
|
|
* reports a tree with composites correctly
|
|
* ignores null children
|
|
* ignores false children
|
|
* reports text nodes as children
|
|
* reports a single text node as a child
|
|
* reports a single number node as a child
|
|
* reports a zero as a child
|
|
* skips empty nodes for multiple children
|
|
* reports html content as no children
|
|
* updates text of a single text child
|
|
* updates from no children to a single text child
|
|
* updates from a single text child to no children
|
|
* updates from html content to a single text child
|
|
* updates from a single text child to html content
|
|
* updates from no children to multiple text children
|
|
* updates from multiple text children to no children
|
|
* updates from html content to multiple text children
|
|
* updates from multiple text children to html content
|
|
* updates from html content to no children
|
|
* updates from no children to html content
|
|
* updates from one text child to multiple text children
|
|
* updates from multiple text children to one text child
|
|
* updates text nodes when reordering
|
|
* updates host nodes when reordering with keys
|
|
* updates host nodes when reordering without keys
|
|
* updates a single composite child of a different type
|
|
* updates a single composite child of the same type
|
|
* updates from no children to a single composite child
|
|
* updates from a single composite child to no children
|
|
* updates mixed children
|
|
* updates with a host child
|
|
* updates from null to a host child
|
|
* updates from a host child to null
|
|
* updates from a host child to a composite child
|
|
* updates from a composite child to a host child
|
|
* updates from null to a composite child
|
|
* updates from a composite child to null
|
|
* updates with a host child
|
|
* updates from null to a host child
|
|
* updates from a host child to null
|
|
* updates from a host child to a composite child
|
|
* updates from a composite child to a host child
|
|
* updates from null to a composite child
|
|
* updates from a composite child to null
|
|
* tracks owner correctly
|
|
* purges unmounted components automatically
|
|
* reports update counts
|
|
* does not report top-level wrapper as a root
|
|
* registers inlined text nodes
|
|
* works
|
|
|
|
src/renderers/shared/hooks/__tests__/ReactHostOperationHistoryHook-test.js
|
|
* gets recorded for host roots
|
|
* gets recorded for composite roots
|
|
* gets recorded when a native is mounted deeply instead of null
|
|
* gets recorded during mount
|
|
* gets recorded during an update
|
|
* gets ignored if the styles are shallowly equal
|
|
* gets recorded during mount
|
|
* gets recorded during mount
|
|
* gets recorded during mount
|
|
* gets recorded during an update from text content
|
|
* gets recorded during an update from html
|
|
* gets recorded during an update from children
|
|
* gets recorded when composite renders to a different type
|
|
* gets recorded when composite renders to null after a native
|
|
* gets recorded during an update from text content
|
|
* gets recorded during an update from html
|
|
* gets recorded during an update from children
|
|
* gets reported when a child is inserted
|
|
* gets reported when a child is inserted
|
|
* gets reported when a child is removed
|
|
|
|
src/renderers/shared/shared/__tests__/ReactComponentLifeCycle-test.js
|
|
* should correctly determine if a component is mounted
|
|
* should correctly determine if a null component is mounted
|
|
* warns if findDOMNode is used inside render
|
|
|
|
src/renderers/shared/shared/__tests__/ReactCompositeComponent-test.js
|
|
* should warn about `forceUpdate` on unmounted components
|
|
* should warn about `setState` on unmounted components
|
|
* should disallow nested render calls
|
|
|
|
src/renderers/shared/shared/__tests__/ReactMultiChild-test.js
|
|
* should warn for using maps as children with owner info
|
|
|
|
src/renderers/shared/shared/__tests__/ReactStatelessComponent-test.js
|
|
* should warn for childContextTypes on a functional component
|
|
* should warn when given a ref
|