We invoke Enzyme to shallow render, which also invokes the React lifecycle methods *.

Wrapping our assertion code inside a process.nextTick() ensures that the functions queued in the current event loop are completed, thus also ensuring that our Promises and other code inside ExampleComponent is done executing.