updated error message when Promise is not defined
refactored test for Promise support