Skip to content

Commit

Permalink
Gate tests
Browse files Browse the repository at this point in the history
We don't warn for the www entry point.
  • Loading branch information
sebmarkbage committed Mar 27, 2024
1 parent d142b8c commit 5e04136
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-dom/src/__tests__/ReactDOMRoot-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ describe('ReactDOMRoot', () => {
expect(container.textContent).toEqual('Hi');
});

// @gate !www || !__DEV__
it('warns if you import createRoot from react-dom', async () => {
expect(() => ReactDOM.createRoot(container)).toErrorDev(
'You are importing createRoot from "react-dom" which is not supported. ' +
Expand All @@ -57,6 +58,7 @@ describe('ReactDOMRoot', () => {
);
});

// @gate !www || !__DEV__
it('warns if you import hydrateRoot from react-dom', async () => {
expect(() => ReactDOM.hydrateRoot(container, null)).toErrorDev(
'You are importing hydrateRoot from "react-dom" which is not supported. ' +
Expand Down

0 comments on commit 5e04136

Please sign in to comment.