Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 91a8b9f

Browse files
test(formatNumber): check exponentially small numbers
Adds test from #10252 Closes #10252 Closes #10246
1 parent b732508 commit 91a8b9f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/ng/filter/filtersSpec.js

+8
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,14 @@ describe('filters', function() {
236236
expect(number(-1e-7, 6)).toEqual('0.000000');
237237
expect(number(-1e-8, 9)).toEqual('-0.000000010');
238238
});
239+
240+
it('should filter exponentially small numbers when no fraction specified', function() {
241+
expect(number(1e-10)).toEqual('0.000');
242+
expect(number(0.0000000001)).toEqual('0.000');
243+
244+
expect(number(-1e-10)).toEqual('0.000');
245+
expect(number(-0.0000000001)).toEqual('0.000');
246+
});
239247
});
240248

241249
describe('json', function() {

0 commit comments

Comments
 (0)