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

Stubbing Window.location.href With Sinon

I am trying to test some client-side code and for that I need to stub the value of window.location.… Read more Stubbing Window.location.href With Sinon

Test Simple Logger Functions With Full Code Coverage

I'm using Chai, Sinon and Instanbul to test a NodeJS application. Here's the Logger code: i… Read more Test Simple Logger Functions With Full Code Coverage

Sinon - Stubbing Function With Callback - Causing Test Method To Timeout

I have a method on a express route that looks like this: exports.register_post = function(req, res)… Read more Sinon - Stubbing Function With Callback - Causing Test Method To Timeout

Sinon Spy On Function Not Working

I'm trying to write a standalone test for this simple middleware function function onlyInternal… Read more Sinon Spy On Function Not Working

Stubbing Redis Interactions In Javascript Using Sinon

I am working in node.js. My app interacts with Redis via the node_redis module. I'm using moch… Read more Stubbing Redis Interactions In Javascript Using Sinon

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