test(common): add PercentPipe round and trim tests (#27365)

Add tests to cover the percent's decimal to be rounded and trimmed.
PR Close #27365
This commit is contained in:
Christopher Dahm 2018-11-29 22:47:40 -05:00 committed by Igor Minar
parent f3f2ef4a2a
commit d84705121a
1 changed files with 2 additions and 0 deletions

View File

@ -68,6 +68,8 @@ import {beforeEach, describe, expect, it} from '@angular/core/testing/src/testin
describe('transform', () => {
it('should return correct value for numbers', () => {
expect(pipe.transform(1.23)).toEqual('123%');
expect(pipe.transform(1.234)).toEqual('123%');
expect(pipe.transform(1.236)).toEqual('124%');
expect(pipe.transform(12.3456, '0.0-10')).toEqual('1,234.56%');
});