Scott demonstrates his solution to exercise 5. He also shares a few variations of the tests, since there are many ways they could be written.
(soothing music)…- I'm aware that there are going to be…tons of differences of how people tested this,…and this is great,…because there are so many ways you can do it.…Some people start it using "before" and "before each",…and maybe even "after" and "after each".…Some people use promises,…some people made multiple requests inside of one it block,…some people did nested describes or many describes.…So there's so many ways you can do this.…There's not one right way to write these tests.…
I'm going to show you the solution that I have,…which probably is not one of the best ways…but ...…Let me stash this bar.…Code this actually.…All right, so, city check out, step five.…Fix.…So the way I wrote it was…I just did nested request…for things that needed resourced to be there already.…
So as far as creating a lion,…the way I created a lion is ...…Well this one was pretty easy, you just create a lion.…So you make a post request,…you then find out you have to use the dot sim method,…and you can send adjacent to the request,…so I'm just putting in a lion here.…
This course was created by Frontend Masters. It was originally released on 12/30/2015. We're pleased to host this training in our library.
- Executing Node.js
- Using Express
- What is middleware?
- Testing in Node.js
- Using Mongo with Node.js
- Data modeling
- Querying data with Mongoose
- Identifying sensitive routes
- Configuring the deployment
Skill Level Intermediate
Building a Slack Bot with Node.js Microserviceswith Daniel Khan2h 9m Intermediate
Building APIs Using Hapi in Node.jswith Kirsten Hunter2h 23m Intermediate
2. REST APIs
5. Organization and Configuration
7. Data Modeling
10. Securing Routes
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.