angular.mock.service.$browser.xhr.flush

Description

Flushes all pending requests and executes xhr callbacks with the trained response as the argument.

Usage

$browser.xhr.flush();