From c98cac96ae40f7ca2cef15d207690a8934058a35 Mon Sep 17 00:00:00 2001 From: Ricky Hanlon Date: Fri, 26 Jan 2024 17:01:15 -0500 Subject: [PATCH] s/ReactDOMX/ReactDOM --- .../__tests__/ReactCompositeComponent-test.js | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/react-dom/src/__tests__/ReactCompositeComponent-test.js b/packages/react-dom/src/__tests__/ReactCompositeComponent-test.js index 2b423de60d9cd..c58e825203f8e 100644 --- a/packages/react-dom/src/__tests__/ReactCompositeComponent-test.js +++ b/packages/react-dom/src/__tests__/ReactCompositeComponent-test.js @@ -12,7 +12,7 @@ let ChildUpdates; let MorphingComponent; let React; -let ReactDOMX; +let ReactDOM; let ReactDOMClient; let ReactCurrentOwner; let Scheduler; @@ -65,7 +65,7 @@ describe('ReactCompositeComponent', () => { beforeEach(() => { jest.resetModules(); React = require('react'); - ReactDOMX = require('react-dom'); + ReactDOM = require('react-dom'); ReactDOMClient = require('react-dom/client'); ReactCurrentOwner = require('react').__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED @@ -225,7 +225,7 @@ describe('ReactCompositeComponent', () => { const root = ReactDOMClient.createRoot(el); expect(() => { expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toThrow( @@ -254,7 +254,7 @@ describe('ReactCompositeComponent', () => { const el = document.createElement('div'); const root = ReactDOMClient.createRoot(el); expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toErrorDev( @@ -336,7 +336,7 @@ describe('ReactCompositeComponent', () => { const container = document.createElement('div'); const root = ReactDOMClient.createRoot(container); expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toErrorDev( @@ -370,7 +370,7 @@ describe('ReactCompositeComponent', () => { const root = ReactDOMClient.createRoot(container); expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toErrorDev( @@ -506,7 +506,7 @@ describe('ReactCompositeComponent', () => { const root = ReactDOMClient.createRoot(container); expect(() => { expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toThrow(TypeError); @@ -518,7 +518,7 @@ describe('ReactCompositeComponent', () => { // Test deduplication expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toThrow(TypeError); @@ -542,7 +542,7 @@ describe('ReactCompositeComponent', () => { let instance; const root = ReactDOMClient.createRoot(container); expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render( (instance = ref)} />); }); }).toErrorDev( @@ -575,7 +575,7 @@ describe('ReactCompositeComponent', () => { const root = ReactDOMClient.createRoot(document.createElement('div')); expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(instance); }); }).toThrow(); @@ -635,7 +635,7 @@ describe('ReactCompositeComponent', () => { }); expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { instance.setState({bogus: true}); }); }).toErrorDev( @@ -655,7 +655,7 @@ describe('ReactCompositeComponent', () => { const root = ReactDOMClient.createRoot(document.createElement('div')); expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toErrorDev( @@ -677,7 +677,7 @@ describe('ReactCompositeComponent', () => { const root = ReactDOMClient.createRoot(document.createElement('div')); expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toErrorDev( @@ -703,7 +703,7 @@ describe('ReactCompositeComponent', () => { const root = ReactDOMClient.createRoot(document.createElement('div')); expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toErrorDev( @@ -756,7 +756,7 @@ describe('ReactCompositeComponent', () => { } expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toErrorDev( @@ -853,7 +853,7 @@ describe('ReactCompositeComponent', () => { const root = ReactDOMClient.createRoot(container); expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toErrorDev( @@ -898,10 +898,10 @@ describe('ReactCompositeComponent', () => { const root = ReactDOMClient.createRoot(container); expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toThrow(); @@ -1204,7 +1204,7 @@ describe('ReactCompositeComponent', () => { const root = ReactDOMClient.createRoot(document.createElement('div')); expect(() => { expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toThrow(); @@ -1236,7 +1236,7 @@ describe('ReactCompositeComponent', () => { const container = document.createElement('div'); const root = ReactDOMClient.createRoot(container); expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toErrorDev( @@ -1251,7 +1251,7 @@ describe('ReactCompositeComponent', () => { const root = ReactDOMClient.createRoot(document.createElement('div')); expect(() => { expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toThrow(); @@ -1420,7 +1420,7 @@ describe('ReactCompositeComponent', () => { const container = document.createElement('div'); const root = ReactDOMClient.createRoot(container); expect(() => { - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); }); }).toErrorDev( @@ -1431,7 +1431,7 @@ describe('ReactCompositeComponent', () => { expect(ref.textContent).toBe('1'); // Dedupe. - ReactDOMX.flushSync(() => { + ReactDOM.flushSync(() => { root.render(); });