mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-10-27 11:35:23 -07:00
feat(stats): redesign expanded session view with density chart (#304)
This commit is contained in:
1 parent
cc9af79d6e
commit
6219a81144
13 files changed
+798
-890
No files matched your search
@@ -4,6 +4,7 @@ import test from 'node:test';
|
||||
import {
|
||||
epochDayToDate,
|
||||
epochMsFromDbTimestamp,
|
||||
formatClockDuration,
|
||||
formatRelativeDate,
|
||||
formatSessionDayLabel,
|
||||
} from './formatters';
|
||||
@@ -153,3 +154,9 @@ test('formatSessionDayLabel includes year for past-year dates', () => {
|
||||
assert.notEqual(label, withoutYear);
|
||||
}, fixedNow);
|
||||
});
|
||||
|
||||
test('formatClockDuration keeps seconds for sub-hour spans', () => {
|
||||
assert.equal(formatClockDuration(42_000), '42s');
|
||||
assert.equal(formatClockDuration(372_000), '6m 12s');
|
||||
assert.equal(formatClockDuration(3_780_000), '1h 3m');
|
||||
});
|
||||
Reference in new issue
Block a user