@samitouri / QOS-React / commits / 9a72e62271

run SchedulerFeatureFlags with variant flags again (#26851)

With df12d7eac40c87bd5fdde0aa5a739bce9e7dce27 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 ee4233bdbc71a7e09395a613c7dde01194d2a830. Test Plan: Run and notice the boolean flags follow the variant: ``` yarn test-www --variant=true yarn test-www --variant=false ```

Jan Kassens committed May 25, 2023 at 10:38 UTC 9a72e622716f6dab714ebe8b957ee9970154664b
1 file changed +10 -1
scripts/jest/setupTests.www.js
+10 -1
@@ -24,9 +24,18 @@ jest.mock('scheduler/src/SchedulerFeatureFlags', () => {
24 ),
25 {virtual: true}
26 );
27 - return jest.requireActual(
27 + const actual = jest.requireActual(
28 schedulerSrcPath + '/src/forks/SchedulerFeatureFlags.www'
29 );
30 +
31 + // These flags are not a dynamic on www, but we still want to run
32 + // tests in both versions.
33 + actual.enableIsInputPending = __VARIANT__;
34 + actual.enableIsInputPendingContinuous = __VARIANT__;
35 + actual.enableProfiling = __VARIANT__;
36 + actual.enableSchedulerDebugging = __VARIANT__;
37 +
38 + return actual;
39 });
40
41 global.__WWW__ = true;