Popular Posts
-
Kendo UI applying SUM in footer template kendo ui - KendoUI: Grid Summary values in Footer - Stack Overflow : ", footerTemplate:...
-
http://www.codeproject.com/Articles/1108855/ways-to-Bind-Multiple-Models-on-a-View-in-MVC
-
MVC grid example ASP.NET MVC Flexigrid sample - CodeProject : 'via Blog this'
Saturday, May 31, 2014
introduction.js
Jasmine testing function with callbacks ..
describe("Testing function callback", function () {
it("calls the callback", function () {
var callbackObject = new CallBackTest();
// NB: a dummy object with function success so can be used to check callback was called
var observer = {
success: function() {}
};
// spies always need an object and a method
spyOn(observer, "success");
callbackObject.doIt(observer.success);
expect(observer.success).toHaveBeenCalled();
});
});
function CallBackTest() {
this.doIt = function (success) {
return success();
};
}
'via Blog this'
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment