Today’s class introduces students to test-driven development and unit testing JavaScript applications.
By the end of class, students will be able to:
Explain the benefits of test-driven development.
Use unit tests as a way to define code requirements for code that hasn’t been written yet.
Write unit tests for pre-existing JavaScript functions.
Use mocks to test side effects such as reading/writing to the file system, printing to the console, and AJAX requests.
Use the Arrange-Act-Assert (AAA) pattern to structure test code.
There are no slides for this lesson.