Skip to content

Commit

Permalink
Remove treeBaseTime getter from test renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Jun 16, 2018
1 parent cf11935 commit 111a4f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions packages/react-test-renderer/src/ReactTestRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,6 @@ class ReactTestInstance {
return this._currentFiber().memoizedProps;
}

get treeBaseTime(): number {
return this._currentFiber().treeBaseTime || 0;
}

get parent(): ?ReactTestInstance {
let parent = this._fiber.return;
while (parent !== null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('ReactProfiler DevTools integration', () => {
// At this point, the base time should include both:
// The time 2ms in the App component itself, and
// The 10ms spend in the Profiler sub-tree beneath.
expect(rendered.root.findByType(App).treeBaseTime).toBe(12);
expect(rendered.root.findByType(App)._currentFiber().treeBaseTime).toBe(12);

rendered.update(<App multiplier={2} />);

Expand All @@ -107,6 +107,6 @@ describe('ReactProfiler DevTools integration', () => {
// At this point, the base time should include both:
// The initial 9ms for the components that do not re-render, and
// The updated 6ms for the component that does.
expect(rendered.root.findByType(App).treeBaseTime).toBe(15);
expect(rendered.root.findByType(App)._currentFiber().treeBaseTime).toBe(15);
});
});

0 comments on commit 111a4f0

Please sign in to comment.