From 1f8be1ca66b312fdc396403f01ee8aae9371577a Mon Sep 17 00:00:00 2001 From: Fred Sauer Date: Wed, 16 Jan 2013 18:01:03 -0800 Subject: docs(exceptionHandler): document testing Update src/ng/exceptionHandler.js Here's an iniitla attempt at documenting how one might write a test using $exceptionHandlerProvider. The key take-away is the use of this pattern: it(...  module(...    $exceptionHandlerProvider.mode('log');  });  inject(...  ); }); --- src/ng/exceptionHandler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ng') diff --git a/src/ng/exceptionHandler.js b/src/ng/exceptionHandler.js index 4378e102..f74e09ee 100644 --- a/src/ng/exceptionHandler.js +++ b/src/ng/exceptionHandler.js @@ -11,11 +11,12 @@ * the browser console. * * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by - * {@link ngMock.$exceptionHandler mock $exceptionHandler} + * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing. * * @param {Error} exception Exception associated with the error. * @param {string=} cause optional information about the context in which * the error was thrown. + * */ function $ExceptionHandlerProvider() { this.$get = ['$log', function($log){ -- cgit v1.2.3