Helper functions for running tests after xhr