fix broken test
replace nextTick with setImmediate()