setimmediate fallback for tests