AI Implementation feature(907): Challenges Page and Challenge Solve Modal 1.03 (#49)

This commit was merged in pull request #49.
This commit is contained in:
2026-07-23 03:11:18 +00:00
parent f194641e8c
commit 54f72f88dc
15 changed files with 245 additions and 73 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');
});
});