[Javascript] Unit testing AJAX calls (Was: Probe...)

Matt Warden mwarden at gmail.com
Wed Jan 7 11:44:01 CST 2009


On Wed, Jan 7, 2009 at 12:12 PM, Scott Reynen <scott at randomchaos.com> wrote:
> Does anyone do unit testing on AJAX calls, and if so, how?  I can do
> unit testing on most other JavaScript simply by running the code and
> then testing the result, but with AJAX calls, I'd have to change the
> code itself to call the test framework on response, since the actual
> results of the code are not complete until the AJAX response actually
> comes back.  And I'd like to keep the test framework outside the
> production code.  Suggestions?

I generally point to a static version of the XML that I know is valid
for "unit testing" purposes in this regard. It's more just removing
the variables introduced by the server side code than unit testing.


-- 
Matt Warden
Cincinnati, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.



More information about the Javascript mailing list