feat: Challenges Page and Challenge Solve Modal 1.03

This commit is contained in:
OpenVelo Agent
2026-07-23 03:11:16 +00:00
parent c434e5d3a2
commit 1c64f057f9
10 changed files with 229 additions and 63 deletions
+11 -11
View File
@@ -90,18 +90,18 @@ describe('sortColumnsByAbbrev', () => {
});
describe('formatDdHhMm', () => {
it('formats DD:HH:mm', () => {
expect(formatDdHhMm(0)).toBe('00:00:00');
expect(formatDdHhMm(59)).toBe('00:00:00');
expect(formatDdHhMm(60)).toBe('00:00:01');
expect(formatDdHhMm(3600)).toBe('00:01:00');
expect(formatDdHhMm(86400)).toBe('01:00:00');
expect(formatDdHhMm(90061)).toBe('01:01:01');
it('formats DD:HH:mm:ss', () => {
expect(formatDdHhMm(0)).toBe('00:00:00:00');
expect(formatDdHhMm(59)).toBe('00:00:00:59');
expect(formatDdHhMm(60)).toBe('00:00:01:00');
expect(formatDdHhMm(3600)).toBe('00:01:00:00');
expect(formatDdHhMm(86400)).toBe('01:00:00:00');
expect(formatDdHhMm(90061)).toBe('01:01:01:01');
});
it('returns 00:00:00 for negative or non-finite', () => {
expect(formatDdHhMm(-1)).toBe('00:00:00');
expect(formatDdHhMm(Number.NaN)).toBe('00:00:00');
expect(formatDdHhMm(Number.POSITIVE_INFINITY)).toBe('00:00:00');
it('returns 00:00:00:00 for negative or non-finite', () => {
expect(formatDdHhMm(-1)).toBe('00:00:00:00');
expect(formatDdHhMm(Number.NaN)).toBe('00:00:00:00');
expect(formatDdHhMm(Number.POSITIVE_INFINITY)).toBe('00:00:00:00');
});
});