samedi 6 juin 2015

Chai / Expect - how to work while developing? Seems really hard to go from expect().to.throw to logging the error

I have this code

expect(function() {
   //some error
}).to.throw(Error);

How do I easily go from this to logging the error right here in the test?

Do I really have to type try/catch and console.log? Doesn't that go against the fact that I will need to remove them eventually for the test to pass?

Aucun commentaire:

Enregistrer un commentaire