Providing concise syntax for ajax tdd
See http://jqueryspy.com/ for further details:
== What is JQuery Spy?==
Jquery spy is a plugin to extend jquery, qunit and sinon.js providing developers a concise, elegant way to write / describe tests for test driven development (tdd)
== Why do we need JQuery Spy?==
The most important reason is to be able to test ajax in a ledgible way. Secondly, to encourage testing by making it easier for every tom dick and harry javascript developer.
== As a Developer, I want to test ==
As a Developer, I want to test the following in an easy to remember syntax:
Test the $.ajax method was called Test ajax request url Test ajax request type Test ajax request dataType Test ajax response success method was called within a certain time After ajax response, test an element exists After ajax response, test an element style After ajax response, test an element contents