mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
fix(numberFilter): fix rounding error edge case
Fix a number rounding error. Closes #7453 Closes #7478
This commit is contained in:
committed by
Peter Bacon Darwin
parent
a84344adb6
commit
81d427b5f0
@@ -150,6 +150,10 @@ describe('filters', function() {
|
||||
expect(number(1234.567, 0)).toEqual("1,235");
|
||||
expect(number(1234.567, 1)).toEqual("1,234.6");
|
||||
expect(number(1234.567, 2)).toEqual("1,234.57");
|
||||
expect(number(1.255, 0)).toEqual("1");
|
||||
expect(number(1.255, 1)).toEqual("1.3");
|
||||
expect(number(1.255, 2)).toEqual("1.26");
|
||||
expect(number(1.255, 3)).toEqual("1.255");
|
||||
});
|
||||
|
||||
it('should filter exponentially large numbers', function() {
|
||||
|
||||
Reference in New Issue
Block a user