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

DaniSomoza / galactic-commander / 12457139241

22 Dec 2024 07:38PM UTC coverage: 52.086% (-13.5%) from 65.587%
12457139241

push

github

web-flow
Build units (#11)

* update models in game-engine

* added fleets

* add build unit service and troops page

* added build units dialog

* added build units queue

206 of 790 branches covered (26.08%)

Branch coverage included in aggregate %.

366 of 893 new or added lines in 84 files covered. (40.99%)

10 existing lines in 7 files now uncovered.

1417 of 2326 relevant lines covered (60.92%)

3.83 hits per line

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

42.86
/packages/game-engine/src/engine/tasks/utils/createStartBuildUnitsTask.ts
1
import {
4✔
2
  ITask,
3
  PENDING_TASK_STATUS,
4
  START_BUILD_UNITS_TASK_TYPE,
5
  StartBuildUnitsTaskType
6
} from '../../../types/ITask'
7
import getSecond from '../../../helpers/getSecond'
4✔
8

9
// TODO: add create BASE task
10
function createStartBuildUnitsTask(
11
  universeId: string,
12
  playerId: string,
13
  planetId: string,
14
  unitId: string,
15
  amount: number,
16
  executeTaskAt?: number
17
): ITask<StartBuildUnitsTaskType> {
NEW
18
  const startResearchTask: ITask<StartBuildUnitsTaskType> = {
×
19
    type: START_BUILD_UNITS_TASK_TYPE,
20

21
    universeId,
22

23
    data: {
24
      playerId,
25
      planetId,
26
      build: {
27
        unitId,
28
        amount
29
      }
30
    },
31

32
    status: PENDING_TASK_STATUS,
33
    isCancellable: false,
34

35
    executeTaskAt: executeTaskAt ? getSecond(executeTaskAt) : null,
×
36
    processedAt: null,
37
    processingDuration: null,
38

39
    history: [
40
      {
41
        taskStatus: PENDING_TASK_STATUS,
42
        updatedAt: new Date().getTime()
43
      }
44
    ],
45

46
    errorDetails: null
47
  }
48

NEW
49
  return startResearchTask
×
50
}
51

52
export default createStartBuildUnitsTask
4✔
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