});
        
        expect(setStateCount).toBe(
          debugRenderPhaseSideEffectsForStrictMode ? 2 : 1,
        );
        
        expect(instance.state.count).toBe(2);
      });
    });
  });
  describe('async subtree', () => {
    beforeEach(() => {
      jest.resetModules();
      React = require('react');
      ReactTestRenderer = require('react-test-renderer');
    });
    it('should warn about unsafe legacy lifecycle methods within the tree', () => {
      class SyncRoot extends React.Component {
        UNSAFE_componentWillMount() {}
        UNSAFE_componentWillUpdate() {}
        UNSAFE_componentWillReceiveProps() {}
        render() {
          return (
            <React.unstable_AsyncMode>
              <AsyncRoot />
            </React.unstable_AsyncMode>
          );
        }
      }
      class AsyncRoot extends React.Component {