fixing promise unit tests