Skip to content

Commit

Permalink
add comments to test case
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeiZ committed Sep 10, 2022
1 parent 92e196c commit 0233f2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5330,6 +5330,9 @@ describe('ReactDOMFizzServer', () => {
});
expect(getVisibleChildren(container)).toEqual(['AB', 'C']);

// Hydration uses a different renderer runtime (Fiber instead of Fizz).
// We reset _currentRenderer here to not trigger a warning about multiple
// renderers concurrently using these contexts
ContextA._currentRenderer = null;
ServerContext._currentRenderer = null;
ReactDOMClient.hydrateRoot(container, <App />);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,9 @@ describe('ReactFlightDOMBrowser', () => {
const container = document.createElement('div');
const root = ReactDOMClient.createRoot(container);
await act(async () => {
// Client uses a different renderer.
// We reset _currentRenderer here to not trigger a warning about multiple
// renderers concurrently using this context
ContextA._currentRenderer = null;
root.render(<Client />);
});
Expand Down

0 comments on commit 0233f2c

Please sign in to comment.