diff --git a/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js b/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js index ba6e58715b4aa..d173740d555a3 100644 --- a/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js +++ b/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js @@ -18,7 +18,7 @@ global.TextDecoder = require('util').TextDecoder; let clientExports; let serverExports; let clientManifest; -let webpackServerMap; +let serverManifest; let act; let React; let ReactDOMClient; @@ -35,7 +35,7 @@ describe('ReactFlightDOMBrowser', () => { clientExports = WebpackMock.clientExports; serverExports = WebpackMock.serverExports; clientManifest = WebpackMock.webpackMap; - webpackServerMap = WebpackMock.webpackServerMap; + serverManifest = WebpackMock.webpackServerMap; React = require('react'); ReactDOMClient = require('react-dom/client'); ReactServerDOMServer = require('react-server-dom-webpack/server.browser'); @@ -75,7 +75,7 @@ describe('ReactFlightDOMBrowser', () => { } function requireServerRef(ref) { - const metaData = webpackServerMap[ref]; + const metaData = serverManifest[ref]; const mod = __webpack_require__(metaData.id); if (metaData.name === '*') { return mod; @@ -85,7 +85,7 @@ describe('ReactFlightDOMBrowser', () => { async function callServer(actionId, body) { const fn = requireServerRef(actionId); - const args = await ReactServerDOMServer.decodeReply(body, webpackServerMap); + const args = await ReactServerDOMServer.decodeReply(body, serverManifest); return fn.apply(null, args); } diff --git a/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMReply-test.js b/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMReply-test.js index c53f8b6f5fc53..e5134037e2416 100644 --- a/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMReply-test.js +++ b/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMReply-test.js @@ -15,8 +15,7 @@ global.ReadableStream = global.TextEncoder = require('util').TextEncoder; global.TextDecoder = require('util').TextDecoder; -// let serverExports; -let webpackServerMap; +let serverManifest; let ReactServerDOMServer; let ReactServerDOMClient; @@ -24,8 +23,7 @@ describe('ReactFlightDOMReply', () => { beforeEach(() => { jest.resetModules(); const WebpackMock = require('./utils/WebpackMock'); - // serverExports = WebpackMock.serverExports; - webpackServerMap = WebpackMock.webpackServerMap; + serverManifest = WebpackMock.webpackServerMap; ReactServerDOMServer = require('react-server-dom-webpack/server.browser'); ReactServerDOMClient = require('react-server-dom-webpack/client'); }); @@ -34,7 +32,7 @@ describe('ReactFlightDOMReply', () => { const body = await ReactServerDOMClient.encodeReply(undefined); const missing = await ReactServerDOMServer.decodeReply( body, - webpackServerMap, + serverManifest, ); expect(missing).toBe(undefined); @@ -44,7 +42,7 @@ describe('ReactFlightDOMReply', () => { }); const object = await ReactServerDOMServer.decodeReply( body2, - webpackServerMap, + serverManifest, ); expect(object.array.length).toBe(3); expect(object.array[0]).toBe(undefined); @@ -66,7 +64,7 @@ describe('ReactFlightDOMReply', () => { }); const iterable = await ReactServerDOMServer.decodeReply( body, - webpackServerMap, + serverManifest, ); const items = []; // eslint-disable-next-line no-for-of-loops/no-for-of-loops