refactor: rewrite waitFor tests
#1863
+375
−290
Open
waitFor tests
#1863