mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-18 15:50:22 +00:00
docs(mocks): update src/ngMock/angular-mocks.js documentation
Clarify how to use `$exceptionHandlerProvider.mode('log')` in tests
This commit is contained in:
parent
d8522aa349
commit
af6f2483be
1 changed files with 2 additions and 3 deletions
5
src/ngMock/angular-mocks.js
vendored
5
src/ngMock/angular-mocks.js
vendored
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/**
|
||||
* @license AngularJS v"NG_VERSION_FULL"
|
||||
* (c) 2010-2012 Google, Inc. http://angularjs.org
|
||||
|
|
@ -221,8 +220,8 @@ angular.mock.$ExceptionHandlerProvider = function() {
|
|||
* - `rethrow`: If any errors are are passed into the handler in tests, it typically
|
||||
* means that there is a bug in the application or test, so this mock will
|
||||
* make these tests fail.
|
||||
* - `log`: Sometimes it is desirable to test that an error is throw, for this case the `log` mode stores the
|
||||
* error and allows later assertion of it.
|
||||
* - `log`: Sometimes it is desirable to test that an error is throw, for this case the `log` mode stores an
|
||||
* array of errors in `$exceptionHandler.errors`, to allow later assertion of them.
|
||||
* See {@link ngMock.$log#assertEmpty assertEmpty()} and
|
||||
* {@link ngMock.$log#reset reset()}
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue