be careful, this will give intermittents.

I think the best way to do this is to have an empty function, and use sinon to "yield" the desired value only in the tests where you need it.