Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
It is a great idea to verify that exceptions are thrown in your code when you intend them to. They are part of your happy path. Let's go catch some!
FIRST
- Fast. Like super fast, or they won't be run.
- Isolated. Make sure you are only testing what you intend to test.
- Repeatable. Every test run should return the same results. Be careful of time and intermittent failures. Over-specifying expectations are usually a sign of possible breakage.
- Self-verifying. If tests are passing, you should feel safe that things are good to go to production. If they are failing, you should fix them, and trust that something indeed is broken. Trust trust trust.
- Timely. Write tests either before or as you write code. Don't fall behind!
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
k doshi
Full Stack JavaScript Techdegree Student 910 Points1 Answer
-
Codrin Postu
8,022 Points3 Answers
-
Ross Logan
8,131 Points2 Answers
-
PLUS
Leonard Morrison
Courses Plus Student 32,914 Points3 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up