Got this debugging another error. Filing here for reference. Original code: https://phabricator.intern.facebook.com/P59317705
const root = ReactDOM.createRoot(container);
    const batch = root.createBatch();
    batch.render(<AsyncMode>Foo</AsyncMode>);
    flush();
    
    expect(container.textContent).toEqual('');
    let ops = [];
    batch.then(() => {
      
      ops.push(container.textContent);
      
      batch.commit();
      ops.push(container.textContent);
    });
    expect(ops).toEqual(['', 'Foo']);
  });
  it('`batch.render` returns a thenable work object', () => {
    const root = ReactDOM.createRoot(container);
    const batch = root.createBatch();
    const work = batch.render('Hi');
    let ops = [];
    work.then(() => {
      ops.push('inside callback: ' + container.textContent);
    });
    ops.push('before committing: ' + container.textContent);
    batch.commit();
    ops.push('after committing: ' + container.textContent);
    expect(ops).toEqual([
      'before committing: ',