• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DaniSomoza / galactic-commander / 11940541664

20 Nov 2024 07:39PM UTC coverage: 65.587% (-31.2%) from 96.824%
11940541664

push

github

web-flow
Frontend initial implementation and player perks feature (#10)

* added vite react-ts template

* Add register and login pages

* Add initial frontend implementation

* Add first iteration of research queue

* first version of the research page

* added assets

* Added pirate research assets

* Added translation support

* updated planet images

* added first version of the bonus

181 of 418 branches covered (43.3%)

Branch coverage included in aggregate %.

532 of 983 new or added lines in 110 files covered. (54.12%)

8 existing lines in 4 files now uncovered.

1176 of 1651 relevant lines covered (71.23%)

4.75 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/packages/frontend/src/utils/formatTimer.ts
1
function formatTimer(seconds: number): string {
NEW
2
  if (seconds < 0) {
×
NEW
3
    return `00:00:00`
×
4
  }
5

NEW
6
  const hours = Math.floor(seconds / 3_600)
×
NEW
7
  const minutes = Math.floor((seconds % 3_600) / 60)
×
NEW
8
  const remainingSeconds = seconds % 60
×
9

NEW
10
  const formattedHours = hours.toString().padStart(2, '0')
×
NEW
11
  const formattedMinutes = minutes.toString().padStart(2, '0')
×
NEW
12
  const formattedSeconds = remainingSeconds.toString().padStart(2, '0')
×
13

NEW
14
  if (hours < 24) {
×
NEW
15
    return `${formattedHours}:${formattedMinutes}:${formattedSeconds}`
×
16
  }
17

NEW
18
  const days = Math.floor(seconds / 86_400)
×
NEW
19
  const hoursWithoutDays = Math.floor((seconds % 86_400) / 3_600)
×
20

NEW
21
  const formattedHoursWithoutDays = hoursWithoutDays.toString().padStart(2, '0')
×
22

NEW
23
  return `${days}d ${formattedHoursWithoutDays}:${formattedMinutes}:${formattedSeconds}`
×
24
}
25

26
export default formatTimer
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc