Unit testing Kendo UI DataSources with Jasmine and Mockjax

empty-test

Are you struggling to find a way to unit test your Kendo UI code because you have a pesky DataSource in there, and it keeps trying to fetch data from a server? Has that been your excuse for not testing your code? Good news! It isn’t really too hard to mock out those AJAX calls with Mockjax!

With Mockjax we can return “canned” responses to AJAX requests made by DataSources, return HTTP 500 responses to test error handling, and even add latency, all without having to modify our DataSource.

Please jump over to the Falafel blogs to read my full article. I promise it will be worth the click!

Advertisements
Tagged with: , , , ,
Posted in JavaScript, KendoUI, Programming

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

CodingWithSpike is Jeff Valore. A professional software engineer, focused on JavaScript, Web Development, C# and the Microsoft stack. Jeff is currently a Software Engineer at Virtual Hold Technologies.


I am also a Pluralsight author. Check out my courses!

%d bloggers like this: