Sinon is a mocking framework for JavaScript, which can create spies, stubs and mocks.
In Sinon I can do the following: var myObj = { prop: 'foo' }; sinon.stub(myObj, 'prop').get(function getterFn() { return 'bar'; }); …
javascript reactjs mocking sinon jestjsIf I use sinon with typescript then how do I cast the sinon mock to an instance of my object? …
unit-testing typescript sinonI got the above error message when I ran my test. Below is my code (I'm using Backbone JS and …
testing backbone.js jasmine sinonI am trying to test one of the methods in my react component. It is being called after a button …
reactjs sinon enzymeI am using Mocha, Chai, Karma, Sinon, Webpack for Unit tests. I followed this link to configure my testing environment …
unit-testing reactjs mocha sinon reduxI am trying to test some client-side code and for that I need to stub the value of window.location.…
javascript mocha sinon stubbingI work with Typescript on an AngularJS 1.X project. I use different Javascript libraries for different purposes. To unit-test my …
javascript angularjs typescript sinon stubbingI want to verify that various date fields were updated properly but I don't want to mess around with predicting …
javascript testing sinon stubI've created a database wrapper for my application, shown below. To test it, I obviously would like to replace the …
javascript node.js sinonWhat is the difference between stub.yield([arg1, arg2, ...]) spy.yields([arg1, arg2, ...]) stub.callsArg(index) in the Sinon.js …
javascript sinon