Code coverage report for common/interceptors/httpInterceptor.js

Statements: 27.27% (3 / 11)      Branches: 100% (0 / 0)      Functions: 16.67% (1 / 6)      Lines: 27.27% (3 / 11)      Ignored: none     

All files » common/interceptors/ » httpInterceptor.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 271     1                                       1      
(function() {
  'use strict';
 
  function httpInterceptor($q, $log) {
    return {
      request: function(config) {
        return config;
      },
      requestError: function(rejection) {
        $log.debug(rejection);
        return $q.reject(rejection);
      },
      response: function(response) {
        $log.debug('response: ', response);
        return response;
      },
      responseError: function(rejection) {
        $log.debug(rejection);
        return $q.reject(rejection);
      }
    };
  }
 
  angular.module('common.interceptors.http', [])
    .factory('httpInterceptor', httpInterceptor);
})();