Testing: Mocha + Chai

Watch User Created Playlist (4)

This playlist is user created.

pro-course-rss-logo

PRO RSS Feed

Setting up Unit Testing with Mocha and Chai

Unit Testing with Mocha and Chai

Test Node RESTful API with Mocha and Chai

P

Testing ES6 Promises in Node.js using Mocha and Chai

P
mocha tutorial about Setting up Unit Testing with Mocha and Chai

Setting up Unit Testing with Mocha and Chai

2:44 mocha

Every dependable library needs to have tests to ensure that you don't push accidental bugs. In this lesson, see how you can set up mocha and chai to start testing your library.

mocha tutorial about Unit Testing with Mocha and Chai

Unit Testing with Mocha and Chai

3:01 mocha

Now that you've got everything set up with mocha and chai, it's time to actually write tests. In this lesson you'll learn how to use describe and it to outline your tests and make sure you don't break your library in the future.

mocha tutorial about Test Node RESTful API with Mocha and Chai

Test Node RESTful API with Mocha and Chai

12:05 mocha PRO

In this lesson, we will use Chai's request method to test our Node application's API responses.
By the end of this lesson, you will know how to:
- install the prerequisites to use mocha and chai in your application
- test for HTTP status response codes
- test for a string of text on a page
- test for a json response and validate the properties of the object
- write tests that not only verify the response of your application, but the behavior as well

chai tutorial about Testing ES6 Promises in Node.js using Mocha and Chai

Testing ES6 Promises in Node.js using Mocha and Chai

4:53 chai PRO

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?