Mocking Node.js with Sinon 8
Creating unit tests is a skill, just like any other part of software development. This course will teach you how to effectively isolate your unit tests with spies, stubs, mocks, and fakes.
Creating unit tests that are independent of external systems can be difficult and intimidating. In this course, Mocking Node.js with Sinon, you’ll learn to use the Sinon library for mocking external dependencies while testing your code. First, you’ll explore why mocking matters. Next, you’ll discover the differences between mocks, stubs, spies, and fakes. Finally, you’ll learn how to use a mock in your unit tests. When you’re finished with this course, you’ll have the skills and knowledge of using mocks needed to write unit tests isolated from external dependencies.
Author Name: Nate Taylor
Author Description:
Nate’s first program was written in QBasic on an 8086 clone his dad built. Since then he’s written applications in C++, .NET, and Node.js. He spent the first 12 years of his career writing Windows applications before transitioning to write applications for the web. Regardless of the language or type of application he’s written, he strives for writing clean, testable, and maintainable code. In addition to his day job as a developer, Nate also enjoys speaking at various conferences. He will typica… more
Table of Contents
- Course Overview
1min - Spying on Functions
33mins - Replacing Functions with Stubs
21mins - Simplifying with Fakes
14mins - Using Mocks to Isolate Code
15mins
There are no reviews yet.