mirror of
https://github.com/facebook/react.git
synced 2026-02-26 07:25:30 +00:00
26 lines
1.0 KiB
JavaScript
26 lines
1.0 KiB
JavaScript
'use strict';
|
|
|
|
jest.mock('shared/ReactFeatureFlags', () => {
|
|
jest.mock(
|
|
'ReactFeatureFlags',
|
|
() => jest.requireActual('shared/forks/ReactFeatureFlags.www-dynamic'),
|
|
{virtual: true}
|
|
);
|
|
|
|
const wwwFlags = jest.requireActual('shared/forks/ReactFeatureFlags.www');
|
|
const defaultFlags = jest.requireActual('shared/ReactFeatureFlags');
|
|
|
|
// TODO: Many tests were written before we started running them against the
|
|
// www configuration. Update those tests so that they work against the www
|
|
// configuration, too. Then remove these overrides.
|
|
wwwFlags.disableLegacyContext = defaultFlags.disableLegacyContext;
|
|
wwwFlags.warnAboutUnmockedScheduler = defaultFlags.warnAboutUnmockedScheduler;
|
|
wwwFlags.enableUserTimingAPI = defaultFlags.enableUserTimingAPI;
|
|
wwwFlags.disableJavaScriptURLs = defaultFlags.disableJavaScriptURLs;
|
|
wwwFlags.enableDeprecatedFlareAPI = defaultFlags.enableDeprecatedFlareAPI;
|
|
wwwFlags.disableModulePatternComponents =
|
|
defaultFlags.disableModulePatternComponents;
|
|
|
|
return wwwFlags;
|
|
});
|