angular-mock (or ngMock) is a module of the AngularJS framework providing features helpful for testing.
The angular-mock provides features helpful to the testing of AngularJS applications. Features include:
- mock implementations for exception handling, logging, the http backend, and timeouts
- facilities to help inject objects needed for tests
- facilities to help inject mock objects which are used by the system-under-test.
To use it add angular.js
and angular-mock.js
to the HTML file.