1. 'use strict';
    
  2. 
    
  3. jest.mock('shared/ReactFeatureFlags', () => {
    
  4.   jest.mock(
    
  5.     'ReactFeatureFlags',
    
  6.     () => jest.requireActual('shared/forks/ReactFeatureFlags.www-dynamic'),
    
  7.     {virtual: true}
    
  8.   );
    
  9.   const actual = jest.requireActual('shared/forks/ReactFeatureFlags.www');
    
  10. 
    
  11.   // This flag is only used by tests, it should never be set elsewhere.
    
  12.   actual.forceConcurrentByDefaultForTesting = !__VARIANT__;
    
  13. 
    
  14.   return actual;
    
  15. });
    
  16. 
    
  17. jest.mock('scheduler/src/SchedulerFeatureFlags', () => {
    
  18.   const schedulerSrcPath = process.cwd() + '/packages/scheduler';
    
  19.   jest.mock(
    
  20.     'SchedulerFeatureFlags',
    
  21.     () =>
    
  22.       jest.requireActual(
    
  23.         schedulerSrcPath + '/src/forks/SchedulerFeatureFlags.www-dynamic'
    
  24.       ),
    
  25.     {virtual: true}
    
  26.   );
    
  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;