https://github.com/facebook/react/blob/30b47103d4354d9187dc0f1fb804855a5208ca9f/packages/scheduler/src/Scheduler.js#L180-L185
if (tasks.length > 0 && shouldYield()) {
            Scheduler.unstable_yieldValue('Yield!');
            return work;
          }
        }
      };
      scheduleCallback(NormalPriority, work);
      expect(Scheduler).toFlushAndYield([
        'A',
        'B',
        'Schedule high pri',
        
        
        'Yield!',
        'High pri',
        
        'C',
        'D',
      ]);
    },
  );
  it('cancelling a continuation', () => {
    const task = scheduleCallback(NormalPriority, () => {
      Scheduler.unstable_yieldValue('Yield');
      return () => {
        Scheduler.unstable_yieldValue('Continuation');
      };
    });
    expect(Scheduler).toFlushAndYieldThrough(['Yield']);
    cancelCallback(task);