Sinon is a mocking framework for JavaScript, which can create spies, stubs and mocks.
I am trying to create a spy on a constructor, and see if it gets called -- below are my …
javascript mocha sinonI'm looking for a way in sinon to call different functions in first and second call to the stub method. …
sinonI tried a dummy module and to stub it, but does not work. the app.js function foo() { return run_…
javascript node.js testing mocha sinonI'm trying to learn about Sinon and want to spy on console.log. The code is simple: function logToConsole() { console.…
javascript testing mocha sinon chaiWhen I use Sinon on a function inside an object, it works: function myFunc() { console.log('hello'); } var myObj = { myFunc: …
sinonI've got a method that may throw an Error, but I'm having trouble writing a SinonJS/Mocha/Should unit test …
node.js unit-testing mocha.js sinon should.jsI'm trying to stub a React component method for testing purpose: var Comp = React.createClass({ displayName: "Comp", plop: function() { console.…
javascript reactjs stub sinonGiven a simple Mongoose model: import mongoose, { Schema } from 'mongoose'; const PostSchema = Schema({ title: { type: String }, postDate: { type: Date, default: …
node.js mongodb unit-testing mongoose sinonI have been having a problem trying to make sure Q.ninvoke is called with the args I am passing …
node.js mocha.js sinon chai sinon-chaiI have the following in Express //index.js var service = require('./subscription.service'); var auth = require('../auth/auth.…
node.js express mocha sinon proxyquire