Skip to content

Commit 0853405

Browse files
committed
test: add coverage
1 parent bad3c14 commit 0853405

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/expressionFunctions.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ describe('formatTimeDurationLabels()', () => {
4141
expect(formatDurationsFrFr({ index: 0, label: '0', value: 3603661 })).toBe('1\u00a0001:01:01');
4242
expect(formatDurationsDeDe({ index: 0, label: '0', value: 3603661 })).toBe('1.001:01:01');
4343
});
44+
test('should default to using en-US', () => {
45+
const formatDurations = formatTimeDurationLabels();
46+
expect(formatDurations({ index: 0, label: '0', value: 3603661 })).toBe('1,001:01:01');
47+
});
4448
test('should original string if type of value is string', () => {
4549
const formatDurationsEnUS = formatTimeDurationLabels(numberLocales['en-US']);
4650
expect(formatDurationsEnUS({ index: 0, label: '0', value: 'hello world!' })).toBe('hello world!');

0 commit comments

Comments
 (0)