How can I assert on the args of this function with stubs?
templatesResource.one = function(arg) {
if (arg == 'apple'){
get: sinon.stub().returns getTemplatesDeferred.promise
} else {
get: sinon.stub().returns getTemplatesDeferred.promise
}
}
expect(templatesResource.one).to.have.been.calledWith(123)
Aucun commentaire:
Enregistrer un commentaire