Skip to content

Commit 93de1ea

Browse files
authored
Merge pull request #5842 from plotly/additional-fomatting-tests
Add tests for padding and alignment without formatting numbers
2 parents f598fea + 495b93d commit 93de1ea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/jasmine/tests/lib_number_format_test.js

+6
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,10 @@ describe('number format', function() {
128128
expect(numberFormat(format)(String(-number))).toEqual(negExp, 'string negative');
129129
});
130130
});
131+
132+
it('padding and alignment without formatting numbers', function() {
133+
expect(numberFormat('<10c')(123.456)).toEqual('123.456 ', 'left');
134+
expect(numberFormat('>10c')(123.456)).toEqual(' 123.456', 'right');
135+
expect(numberFormat('^10c')(123.456)).toEqual(' 123.456 ', 'center');
136+
});
131137
});

0 commit comments

Comments
 (0)