¡@

Home 

javascript Programming Glossary: sinon.spy

How can I mock dependencies for unit testing in RequireJS?

http://stackoverflow.com/questions/11439540/how-can-i-mock-dependencies-for-unit-testing-in-requirejs

stubs cnt var map var i18n stubs.i18n stubs.i18n load sinon.spy function name req onLoad onLoad i18n _.each stubs function..

Testing backbone.js application with jasmine - how to test model bindings on a view?

http://stackoverflow.com/questions/6471457/testing-backbone-js-application-with-jasmine-how-to-test-model-bindings-on-a-v

the last call in a series ie mostRecentCall And w sinon.js sinon.spy this.legendView.groupData 'bind' this.myView new MyView expect..

Backbone.js model with collection

http://stackoverflow.com/questions/7140741/backbone-js-model-with-collection

json' JSON.stringify returnData var callback sinon.spy var summarySnapshot new JobSummarySnapshot summarySnapshot.bind..

Why is this sinon spy not being called when I run this test?

http://stackoverflow.com/questions/8441612/why-is-this-sinon-spy-not-being-called-when-i-run-this-test

describe updateDatetime beforeEach @updateSpy sinon.spy @datetime 'updateDatetime' afterEach @datetime.updateDatetime.restore.. @datetime new DateTimeSelector create the spy @updateSpy sinon.spy DateTimeSelector.prototype 'updateDatetime' be sure to change.. your code describe DateTimeSelector beforeEach @updateSpy sinon.spy DateTimeSelector.prototype 'updateDatetime' @datetime new DateTimeSelector..

Stub out a jQuery selector call?

http://stackoverflow.com/questions/8523974/stub-out-a-jquery-selector-call

this var el1 sinon.stub val function el1.returns 2 var el2 sinon.spy val function 'val' doubleIt el1 el2 assert el2.withArgs 4 .calledOnce..