https://github.com/facebook/react/blob/30b47103d4354d9187dc0f1fb804855a5208ca9f/packages/scheduler/src/Scheduler.js#L180-L185
}
      }
    };
    
    scheduleCallback(UserBlockingPriority, work);
    
    expect(Scheduler).toFlushAndYieldThrough(['A', 'B']);
    
    Scheduler.unstable_advanceTime(1);
    expect(Scheduler).toFlushExpired(['C', 'D']);
  });
  it('continuations are interrupted by higher priority work', () => {
    const tasks = [
      ['A', 100],
      ['B', 100],
      ['C', 100],
      ['D', 100],
    ];
    const work = () => {
      while (tasks.length > 0) {
        const [label, ms] = tasks.shift();
        Scheduler.unstable_advanceTime(ms);
        Scheduler.unstable_yieldValue(label);
        if (tasks.length > 0 && shouldYield()) {
          return work;
        }
      }
    };
    scheduleCallback(NormalPriority, work);
    expect(Scheduler).toFlushAndYieldThrough(['A']);