There’s a promise that resolves to an object which has a method called .toString
that needs to be tested. Unfortunately, the current expression fails because the promise is an object being compared to a string:
chai.expect(mypromise).to.eventually.be.equal('1.4')
In order to make this work, we need to call mypromise.toString()
and incorporate it before reaching the equal('1.4')
function. Is there a way to achieve this?