Sinon and Spies

— Spies are used to watching a single function within an object
Reference – sinonjs.org

Example

Output:

Leave a Reply

Your email address will not be published. Required fields are marked *