Got this debugging another error. Filing here for reference. Original code: https://phabricator.intern.facebook.com/P59317705
const root = ReactDOM.createRoot(container);
    const batch1 = root.createBatch();
    batch1.render(1);
    
    expire(2000);
    const batch2 = root.createBatch();
    batch2.render(2);
    expect(container.textContent).toEqual('');
    batch1.commit();
    expect(container.textContent).toEqual('1');
    batch2.commit();
    expect(container.textContent).toEqual('2');
  });
  it('commits a later batch without committing an earlier batch', () => {
    const root = ReactDOM.createRoot(container);
    const batch1 = root.createBatch();
    batch1.render(1);
    
    expire(2000);
    const batch2 = root.createBatch();
    batch2.render(2);
    expect(container.textContent).toEqual('');
    batch2.commit();
    expect(container.textContent).toEqual('2');
    batch1.commit();
    flush();
    expect(container.textContent).toEqual('1');
  });
});