Added check if promise ends with ';' + unit test