Add getPending() helper to fake xhr factory.
Objects don't have a length; it's not clear how this was passing tests before.