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

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

Test Node-schedule With Sinon Faketimers

I want to test my scheduleJob from the node-schedule package. With sinon useFakeTimers() i can skip… Read more Test Node-schedule With Sinon Faketimers

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

Simple Way To Test Middleware In Express Without Creating Recreating Server?

I'd like to be able to stub my middleware functions on a per-test basis. The problem, as articu… Read more Simple Way To Test Middleware In Express Without Creating Recreating Server?

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

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

Spying On Date Constructor With Sinon

I have a method that sets expiration date of a token: var jwt = require('jwt-simple'); modu… Read more Spying On Date Constructor With Sinon

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