Skip to content Skip to sidebar Skip to footer
Showing posts with the label Sinon

How To Spy A Function With Sinon.js That Is In The Same Js File As The Function Under Test

I have a problem with Sinon.js while trying to spy a function that is in the same javascript file a… Read more How To Spy A Function With Sinon.js That Is In The Same Js File As The Function Under Test

Sinon.js Stub A Function That Resolves A Promise

I want to use Sinon to stub a function that uses callbacks which resolve a promise: const callback … Read more Sinon.js Stub A Function That Resolves A Promise

How To Unit Test A Function Which Calls Another That Returns A Promise?

I have a node.js app using express 4 and this is my controller: var service = require('./catego… Read more How To Unit Test A Function Which Calls Another That Returns A Promise?

Sinon - How To Stub Authentication Library (authy -twilio)

I am currently new to Sinon, Mocha, Supertest and in the process to writes tests. In my current sce… Read more Sinon - How To Stub Authentication Library (authy -twilio)

Using Sinon Mocks With Nodeunit

I'm learning to use sinon with nodeunit, specifically to do mocking. The recommended approach … Read more Using Sinon Mocks With Nodeunit

Pulling In Sinon Submodules In Browser With Amd And Webpack

I'm running into the same problem described in this question. Basically sinon only pulls in all… Read more Pulling In Sinon Submodules In Browser With Amd And Webpack

Sinonjs - Advance Clock To 59 Minutes And Wait For 1 Minute Actually

I've a web component for auto-logout functionality which shows modal window with a message on 5… Read more Sinonjs - Advance Clock To 59 Minutes And Wait For 1 Minute Actually

Load Jquery Into Mocha Test For React App

I've created a Mocha test setup similar to this tutorial outlined here: https://github.com/jess… Read more Load Jquery Into Mocha Test For React App