![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the use of sinon.js?
SinonJS provides stand-alone test spies, stubs and mocks. It is a library that we can use to create object mocks for unit testing.
Spies − Fake functions that we can use to track executions.
Stubs −Functions replacements from which we can return whatever we want or have our functions work in a way that suites us to be able to test multiple scenarios.
Mocks −Fake methods
All these objects help in unit testing our code.
Advertisements