mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
fix($locale): Allow currency filter to fall back to maxFrac from locale
- Modify default fallback to `NUMBER_FORMATS.PATTERNS[1].maxFrac` - Remove unnecessary resetting Closes #10179
This commit is contained in:
@@ -120,6 +120,12 @@ describe('filters', function() {
|
||||
expect(currency(0.008)).toBe('$0.01');
|
||||
expect(currency(0.003)).toBe('$0.00');
|
||||
});
|
||||
|
||||
it('should set the default fraction size to the max fraction size of the locale value', inject(function($locale) {
|
||||
$locale.NUMBER_FORMATS.PATTERNS[1].maxFrac = 1;
|
||||
|
||||
expect(currency(1.07)).toBe('$1.1');
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user