I think this shouldn't pass:

```js
    expect(() => {
      expect(() => {
        throw new Error('haha') // no warning
      }).toWarnDev(
        'nope',
      );
    }).toThrow('haha');
```

but it does.
state = {value: 0};
      render() {
        renders++;
        return <div />;
      }
    }
    let instance;
    ReactDOM.render(
      <div>
        <span>
          <Component ref={c => (instance = c || instance)} />
        </span>
      </div>,
      container,
    );
    expect(renders).toBe(1);
    instance.setState({value: 1});
    expect(renders).toBe(2);
    ReactDOM.render(<div />, container);
    expect(() => {
      instance.setState({value: 2});
    }).toWarnDev(
      "Warning: Can't call setState (or forceUpdate) on an unmounted " +
        'component. This is a no-op, but it indicates a memory leak in your ' +
        'application. To fix, cancel all subscriptions and asynchronous ' +
        'tasks in the componentWillUnmount method.\n' +