mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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:
parent
f3f2ef4a2a
commit
d84705121a
1 changed files with 2 additions and 0 deletions
|
|
@ -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%');
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue