The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Testing ES6 Promises in Node.js using Mocha and Chai

Testing ES6 Promises in Node.js using Mocha and Chai

4:53
Writing great ES6 style Promises for Node.js is only half the battle. Your great modules must include tests as well to ensure future iterations don't break them. In this lesson, I show you a simple ES6 Promise in Node.js, then walk you through creating tests in Mocha using chai and chai-as-promised to test both resolve and reject methods.
Watch this lesson now
Avatar
egghead.io

Writing great ES6 style Promises for Node.js is only half the battle. Your great modules must include tests as well to ensure future iterations don't break them. In this lesson, I show you a simple ES6 Promise in Node.js, then walk you through creating tests in Mocha using chai and chai-as-promised to test both resolve and reject methods.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?