run SchedulerFeatureFlags with variant flags again (#26851)

With df12d7eac4 I 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 as
ee4233bdbc.

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:
Jan Kassens
2023-05-25 10:38:33 -04:00
committed by GitHub
parent ee4233bdbc
commit 9a72e62271

View File

@@ -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;