test(promise): refactor state checks and helpers