Skip to content

Commit

Permalink
test(common): add PercentPipe round and trim tests (#27365)
Browse files Browse the repository at this point in the history
Add tests to cover the percent's decimal to be rounded and trimmed.
PR Close #27365
  • Loading branch information
Christopher Dahm authored and IgorMinar committed Dec 3, 2018
1 parent 560cb99 commit 1022db1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/common/test/pipes/number_pipe_spec.ts
Expand Up @@ -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%');
});

Expand Down

0 comments on commit 1022db1

Please sign in to comment.