Spy on setImmediate to make specs pass with React editor enabled