Code coverage report for src\components\filters-user\factory.js

# all files / src/components/filters-user/ factory.js

43.75% Statements 7/16
100% Branches 0/0
20% Functions 1/5
43.75% Lines 7/16

    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
    27
    28
    29
    30
    31
    321×
    1×

    1×

    1×

    1×

    1×

    1×

     (function component(ng) {
      ng.module('components').factory('userFilter', userFilter);

      userFilter.$inject = [];

      function userFilter() {
        var context;
        var save;

        return {
            clear: clearFilters,
            registr: reg,
            save: saveUser
        };

        function reg(con, save) {
            console.log('registr');
            this.context = con;
            this.save = save;
        }

        function clearFilters() {
            console.log('clear');
            this.context();
        }

        function saveUser() {
            this.save();
        }
      }
    })(angular);