Blog2016 ≫ I just used chai-as-promised for the first time

For testing promises (a coding style). I prefer callbacks for my async code, I am old school, but I had to use promises for a thing at work, and I like it.

github.com/domenic/chai-as-promised1

Test promises with code like

[code] expect(foo).should.eventually.equal('bar'); [/code]

Nice

⬅️ :: ➡️

Paul Clarke's blog - I live in Hythe near Folkestone. Wed and dad to 2, I am a full stack web engineer, + I do js / nodejs, some ruby, other languages etc. I like pubs, running, eating, home automation + other diy jiggery-pokery, history, genealogy, Television, squirrels, pirates, lego, and TIME TRAVEL.