react/scripts/jest/setupTests.build.js
Sebastian Markbåge c7ba8c0988
Enforce that the "react-server" build of "react" is used (#27436)
I do this by simply renaming the secret export name in the "subset"
bundle and this renamed version is what the FlightServer uses.

This requires us to be more diligent about always using the correct
instance of "react" in our tests so there's a bunch of clean up for
that.
2023-09-29 18:24:05 -04:00

6 lines
144 B
JavaScript

'use strict';
jest.mock('scheduler', () => jest.requireActual('scheduler/unstable_mock'));
global.__unmockReact = () => jest.unmock('react');