Edit in Plunker

    <script>
      function Ctrl($scope) {
        $scope.val = 1234.56789;
      }
    </script>
    <div ng-controller="Ctrl">
      Enter number: <input ng-model='val'><br>
      Default formatting: <span id='number-default'>{{val | number}}</span><br>
      No fractions: <span>{{val | number:0}}</span><br>
      Negative number: <span>{{-val | number:4}}</span>
    </div>

     it('should format numbers', function() {
       expect(element(by.id('number-default')).getText()).toBe('1,234.568');
       expect(element(by.binding('val | number:0')).getText()).toBe('1,235');
       expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');
     });

     it('should update', function() {
       element(by.model('val')).clear();
       element(by.model('val')).sendKeys('3374.333');
       expect(element(by.id('number-default')).getText()).toBe('3,374.333');
       expect(element(by.binding('val | number:0')).getText()).toBe('3,374');
       expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');
    });

ope.friends = orderBy($scope.friends, predicate, reverse); }; $scope.order('-age',false); }
10;}); it('should not exceed the maximum size of input array', function() { numLimitInput.clear(); numLimitInput.sendKeys('100'); letterLimitInput.clear(); letterLimitInput.sendKeys('100'); expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]'); expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi'); });
uld search in specific fields when filtering with a predicate object', function() { var searchAny = element(by.model('search.$')); searchAny.clear(); searchAny.sendKeys('i'); expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj'); }); it('should use a equal comparison when comparator is true', function() { var searchName = element(by.model('search.name')); var strict = element(by.model('strict')); searchName.clear(); searchName.sendKeys('Julie'); strict.click(); expectFriendNames(['Julie'], 'friendObj'); });