Skip to content

Commit 9a72e62

Browse files
authored
run SchedulerFeatureFlags with variant flags again (#26851)
With df12d7e 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 ee4233b. Test Plan: Run and notice the boolean flags follow the variant: ``` yarn test-www --variant=true yarn test-www --variant=false ```
1 parent ee4233b commit 9a72e62

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

scripts/jest/setupTests.www.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,18 @@ jest.mock('scheduler/src/SchedulerFeatureFlags', () => {
2424
),
2525
{virtual: true}
2626
);
27-
return jest.requireActual(
27+
const actual = jest.requireActual(
2828
schedulerSrcPath + '/src/forks/SchedulerFeatureFlags.www'
2929
);
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;
3039
});
3140

3241
global.__WWW__ = true;

0 commit comments

Comments
 (0)