mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
run SchedulerFeatureFlags with variant flags again (#26851)
Withdf12d7eac4I accidentally made it so that tests aren't run with the 2 variant modes for most SchedulerFeatureFlags anymore. This fixes it with the same approach asee4233bdbc. Test Plan: Run and notice the boolean flags follow the variant: ``` yarn test-www --variant=true yarn test-www --variant=false ```
This commit is contained in:
@@ -24,9 +24,18 @@ jest.mock('scheduler/src/SchedulerFeatureFlags', () => {
|
||||
),
|
||||
{virtual: true}
|
||||
);
|
||||
return jest.requireActual(
|
||||
const actual = jest.requireActual(
|
||||
schedulerSrcPath + '/src/forks/SchedulerFeatureFlags.www'
|
||||
);
|
||||
|
||||
// These flags are not a dynamic on www, but we still want to run
|
||||
// tests in both versions.
|
||||
actual.enableIsInputPending = __VARIANT__;
|
||||
actual.enableIsInputPendingContinuous = __VARIANT__;
|
||||
actual.enableProfiling = __VARIANT__;
|
||||
actual.enableSchedulerDebugging = __VARIANT__;
|
||||
|
||||
return actual;
|
||||
});
|
||||
|
||||
global.__WWW__ = true;
|
||||
|
||||
Reference in New Issue
Block a user