aboutsummaryrefslogtreecommitdiffstats
path: root/test/service/exceptionHandlerSpec.js
blob: 00abff3012f66a57ea07c0e297b7af26c5fb6913 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'use strict';

describe('$exceptionHandler', function() {


  it('should log errors', inject(
    function($provide){
      $provide.service('$exceptionHandler', $ExceptionHandlerProvider);
    },
    function($log, $exceptionHandler) {
      $exceptionHandler('myError');
      expect($log.error.logs.shift()).toEqual(['myError']);
    }
  ));
});