I am using React 15. I have a component which call setTimeout in componentWillMount, the function is similar to ``` javascript class Test extends Component { componentWillMount() { this.timer = setTimeout(() => this.setState(....), 4000); } // ..... } ``` When the timer is triggered, an error is thrown as follow `Invariant Violation: React DOM tree root should always have a node reference.` Here's a related issue on React https://github.com/facebook/react/issues/6232 Is there anyway I could prevent throwing error when testing, without using JSDOM? Edit1: `this.setState(...)` to `() => this.setState(...)`