-
Notifications
You must be signed in to change notification settings - Fork 59
Lesson 9 (Unit Testing & TDD)
Courtney Frey edited this page Apr 13, 2022
·
2 revisions
- What unit testing is and why it is important.
- How to use
Jasmine
for testing. - What test driven development (TDD) is and how to use it to write solid code.
- More info to come... when in doubt, check with the class Candidate Engagement Manager!
- When your third graded assignment becomes available, make sure to check it out! Starting as soon as possible is key to finishing those graded assignments on time!
- Assignment 2 due at end of Day 15
- Reinforce why unit testing is important. If you can share an instance where properly testing your code saved you a huge headache, please do!
- Live coding is your friend for this lesson!
- Q & A for the chapter exercises or perform a walkthrough.
- What "edge case" means, plus examples.
- What does "describe" do compare to "it"? Review syntax, and encourage descriptive feedback messages.
- Studio intro:
- The exercises practiced using unit tests to validate existing code. The studio flips this to a TDD scenario - the students must write tests BEFORE creating any of the code.
- The studio is divided into parts that are in the proper order for TDD. Remind students to not skip around the different steps!
- Reinforce the benefits of writing tests before the code.
- If many of the students have the same questions or problems with writing their first test, consider going through that as a group.
- This would be a good studio for the students to work on in pairs. Each student still needs to submit their own final project, but collaborating on the code helps with the learning curve.