MCPcopy Create free account
hub / github.com/reactjs/react-rails / warnIfUnmockedScheduler

Function warnIfUnmockedScheduler

lib/assets/react-source/development/react.js:26991–27001  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

26989 // to get their tests right.
26990
26991 function warnIfUnmockedScheduler(fiber) {
26992 {
26993 if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {
26994 if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {
26995 didWarnAboutUnmockedScheduler = true;
26996
26997 error('In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://fb.me/react-mock-scheduler');
26998 }
26999 }
27000 }
27001 }
27002
27003 function computeThreadID(root, expirationTime) {
27004 // Interaction threads are unique per root and expiration time.

Callers 1

updateContainerFunction · 0.85

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected