Sinon is a mocking framework for JavaScript, which can create spies, stubs and mocks.
Is there a way to easily reset all sinon spys mocks and stubs that will work cleanly with mocha's beforeEach …
javascript testing mocha stubbing sinonI am trying to stub a method using sinon.js but I get the following error: Uncaught TypeError: Attempted to …
javascript node.js sinonAre there any libraries out there to mock localStorage? I've been using Sinon.JS for most of my other javascript …
javascript unit-testing mocking local-storage sinonI have a data service with following function function getInsureds(searchCriteria) { var deferred = $q.defer(); insuredsSearch.get(searchCriteria, function (insureds) { …
javascript jasmine sinonI am pulling my hair out trying to figure out how to mock a constructor using sinon. I have a …
javascript unit-testing constructor mocking sinonThough there is a same question here but I could not find answer to my problem so here goes my …
node.js sinonI want to stub process.env.FOO with bar. var sinon = require('sinon'); var stub = sinon.stub(process.env, 'FOO', …
node.js stub sinonI would like to verify that bar() is called inside foo() from my unit test. I figured that Sinon spies …
javascript unit-testing sinonTake into account the following example Javascript code below: function privateFunction (time) { if (time < 12) { console.log('Good morning'); } if (…
node.js unit-testing automated-tests mocha sinonI have a function I am stubbing that gets called with multiple arguments. I want to check just the first …
sinon