aboutsummaryrefslogtreecommitdiffstats
path: root/test/service/exceptionHandlerSpec.js
blob: 2f3d0e665192ea7f936c89d1d8d3b65fe2d732eb (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', function() {
    module(function($provide){
      $provide.service('$exceptionHandler', $ExceptionHandlerProvider);
    });
    inject(function($log, $exceptionHandler) {
      $exceptionHandler('myError');
      expect($log.error.logs.shift()).toEqual(['myError']);
    });
  });
});