Skip to content Skip to sidebar Skip to footer
Showing posts with the label 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

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

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

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

Stub A Standalone Module.exports Function Using Rewire

I am trying to stub a module.exports function. But I have some trouble. I will give you a sudo code… Read more Stub A Standalone Module.exports Function Using Rewire

How To Stub/mock Submodules Of A Require Of Nodejs Using Sinon

I am using sinon as for unit testing a nodejs(Hapijs) functionality. This function is in index.js. … Read more How To Stub/mock Submodules Of A Require Of Nodejs Using Sinon

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

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