• 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/waitTaskToFinish.ts
1
import { getTask as getTaskEndpoint } from '../endpoints/game/taskEndpoints'
2

3
async function waitTaskToFinish(taskId: string, customIntervalTime = 1_000) {
×
NEW
4
  return new Promise((resolve, reject) => {
×
NEW
5
    const intervalId = setInterval(async () => {
×
NEW
6
      try {
×
7
        const {
8
          data: { task }
NEW
9
        } = await getTaskEndpoint(taskId)
×
10

11
        const isTaskFinished =
NEW
12
          task.status === 'CANCELLED' || task.status === 'PROCESSED' || task.status === 'ERROR'
×
13

NEW
14
        if (isTaskFinished) {
×
NEW
15
          clearInterval(intervalId)
×
NEW
16
          resolve(task)
×
17
        }
18
      } catch (error) {
NEW
19
        clearInterval(intervalId)
×
NEW
20
        reject(error)
×
21
      }
22
    }, customIntervalTime)
23
  })
24
}
25

26
export default waitTaskToFinish
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