diff --git a/scripts/fiber/tests-passing-except-dev.txt b/scripts/fiber/tests-passing-except-dev.txt index bd22db6cba..95cad08849 100644 --- a/scripts/fiber/tests-passing-except-dev.txt +++ b/scripts/fiber/tests-passing-except-dev.txt @@ -1,61 +1,3 @@ -src/renderers/__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/__tests__/ReactComponentTreeHook-test.native.js * uses displayName or Unknown for classic components * uses displayName, name, or ReactComponent for modern components diff --git a/src/isomorphic/hooks/ReactComponentTreeHook.js b/src/isomorphic/hooks/ReactComponentTreeHook.js index 9fede1ac22..332c5cac8c 100644 --- a/src/isomorphic/hooks/ReactComponentTreeHook.js +++ b/src/isomorphic/hooks/ReactComponentTreeHook.js @@ -182,10 +182,7 @@ function describeID(id: DebugID): string { 'building stack', id ); - if (element && name) { - return describeComponentFrame(name || '', element._source, ownerName || ''); - } - return ''; + return describeComponentFrame(name || '', element && element._source, ownerName || ''); } var ReactComponentTreeHook = { diff --git a/src/renderers/__tests__/ReactComponentTreeHook-test.js b/src/renderers/__tests__/ReactComponentTreeHook-test.js index a9c19c13eb..0e92d9bfdf 100644 --- a/src/renderers/__tests__/ReactComponentTreeHook-test.js +++ b/src/renderers/__tests__/ReactComponentTreeHook-test.js @@ -1736,7 +1736,7 @@ describe('ReactComponentTreeHook', () => { expectDev(ReactComponentTreeTestUtils.getRegisteredDisplayNames()).toEqual([]); }); - describe('stack addenda', () => { + describe.only('stack addenda', () => { it('gets created', () => { function getAddendum(element) { var addendum = ReactComponentTreeHook.getCurrentStackAddendum(element); diff --git a/src/shared/ReactFiberComponentTreeHook.js b/src/shared/ReactFiberComponentTreeHook.js index 51cffdb37f..df24a78b0d 100644 --- a/src/shared/ReactFiberComponentTreeHook.js +++ b/src/shared/ReactFiberComponentTreeHook.js @@ -22,9 +22,8 @@ var { var getComponentName = require('getComponentName'); import type { Fiber } from 'ReactFiber'; -import type { Source } from 'ReactElementType'; -function describeComponentFrame(name, source: Source, ownerName) { +function describeComponentFrame(name, source: any, ownerName) { return '\n in ' + (name || 'Unknown') + ( source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + @@ -48,10 +47,7 @@ function describeFiber(fiber : Fiber) : string { if (owner) { ownerName = getComponentName(owner); } - if (source) { - return describeComponentFrame(name, source, ownerName); - } - return ''; + return describeComponentFrame(name, source, ownerName); default: return ''; }