Got this debugging another error. Filing here for reference. Original code: https://phabricator.intern.facebook.com/P59317705
<div>
            <span className="extra" />
          </div>,
        ),
      ),
    );
    
    const container1 = document.createElement('div');
    container1.innerHTML = markup;
    const root1 = ReactDOM.createRoot(container1);
    root1.render(
      <div>
        <span />
      </div>,
    );
    flush();
    
    const container2 = document.createElement('div');
    container2.innerHTML = markup;
    const root2 = ReactDOM.createRoot(container2, {hydrate: true});
    root2.render(
      <div>
        <span />
      </div>,
    );
    expect(flush).toWarnDev('Extra attributes');
  });
  it('does not clear existing children', async () => {
    container.innerHTML = '<div>a</div><div>b</div>';
    const root = ReactDOM.createRoot(container);