SinonJS is one of the most popular JavaScript libraries for test doubles. This course walks through the various features of SinonJS so that you know not only how to use each feature, but more importantly, why you would use each one.
SinonJS is one of the most popular JavaScript libraries for test doubles. This course walks through the various features of SinonJS so that you know not only how to use each feature, but more importantly, why you would use each one.
Unit testing can be hard, particularly when you're testing against live systems. Data from databases can change, APIs can be down, and accessing file systems can be slow. Using test doubles in your unit tests can help alleviate a lot of the struggles and issues you might experience. In this course, SinonJS Fundamentals, you'll learn how the SinonJS library can help make unit testing easier and more repeatable. First, you'll explore each of the test doubles that Sinon offers. Not only will you learn the syntax, but with the hands-on demos, you'll see how and when to use each test double. Next, you'll delve into other utilities that Sinon offers that simplify checking that the right data was returned. Then, you'll discover how Sinon can help you even with the hard problems of testing, such as faking out dates or XHR data in the browser. Finally, you'll learn how the Sinon ecosystem works to make it easier for you to stay on top of all of your test doubles. By the end of the course, you'll be able to incorporate Sinon into your projects to ensure quick, repeatable test results.
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.