Sherman  Zemlak

Sherman Zemlak

1627226280

How To Unit Test RESTful API With Mocha & Mock MongoDB | JavaScript Testing

Learn how to test you RESTful API using the Mocha framework. During the API tests, we also mock the mongoDB database so we are only testing the API.

We are going to use an express and mongo application which we created in a previous video here: https://youtu.be/w1eUN_DBsWk. We will add unit tests to this application while mocking the mongo database.

Code: https://github.com/kriscfoster/express-mongo

First Video Creating The RESTful API: https://youtu.be/w1eUN_DBsWk

Install MongoDB: https://treehouse.github.io/installation-guides/mac/mongo-mac.html

Don’t forget to Subscribe: https://www.youtube.com/channel/UCWkzkhQ3syxBjjAYwqCbzYg?sub_confirmation=1

#restful #api #mocha #mongodb #javascript

How To Unit Test RESTful API With Mocha & Mock MongoDB | JavaScript Testing