adding promises and sinon.js to unit tests