use global.setImmediate for setImmediate conditional test