← Back to team overview

launchpad-dev team mailing list archive

Mocking XHR requests in YUI unit tests

 

Hi all,

in r13800 of devel the two files iorecorder.js and mockio.js in
lib/lp/app/javascript/testing have been merged. Both were solving the same
problem of mocking XHR requests in YUI unit tests. You can read all about the
resulting MockIo library here:

https://dev.launchpad.net/JavascriptUnitTesting/MockIo

Obviously, all call sites of the previous implementations have been updated.
If you have been mocking io calls in some other fashion in your tests, please
consider updating the tests at the next best chance so we can standardize on
one approach.

Cheers,
Henning