$browser (service in module ngMock )

Description

This service is a mock implementation of angular.module.ng.$browser. It provides fake implementation for commonly used browser apis that are hard to test, e.g. setTimeout, xhr, cookies, etc...

The api of this service is the same as that of the real $browser, except that there are several helper methods available which can be used in tests.

The following apis can be used in tests:

Methods

Properties