MCPcopy Create free account
hub / github.com/microsoft/SandDance / warnIfUnmockedScheduler

Function warnIfUnmockedScheduler

docs/external/js/react-dom.development.js:23431–23441  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

23429 // to get their tests right.
23430
23431 function warnIfUnmockedScheduler(fiber) {
23432 {
23433 if (didWarnAboutUnmockedScheduler === false && unstable_flushAllWithoutAsserting === undefined) {
23434 if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {
23435 didWarnAboutUnmockedScheduler = true;
23436
23437 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');
23438 }
23439 }
23440 }
23441 }
23442
23443 function computeThreadID(root, expirationTime) {
23444 // 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