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

DaniSomoza / galactic-commander / 12444891208

21 Dec 2024 11:46AM UTC coverage: 52.036% (-13.6%) from 65.587%
12444891208

Pull #11

github

web-flow
Merge 9b5ea0e56 into 4f9f087f0
Pull Request #11: Build units

206 of 789 branches covered (26.11%)

Branch coverage included in aggregate %.

366 of 898 new or added lines in 85 files covered. (40.76%)

10 existing lines in 7 files now uncovered.

1417 of 2330 relevant lines covered (60.82%)

3.82 hits per line

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

57.14
/packages/game-engine/src/repositories/planetRepository.ts
1
import PlanetModel from '../models/PlanetModel'
4✔
2
import { IPlanet, IPlanetCoordinates } from '../types/IPlanet'
3

4
async function findPlanetById(planetId: string) {
5
  return PlanetModel.findById(planetId).exec()
×
6
}
7

8
async function findAvailablePrincipalPlanets() {
9
  return PlanetModel.find({
×
10
    isSpecial: false,
11
    isPrincipal: false,
12
    isExplored: false,
13
    isUnderConquer: false,
14
    ownerId: null
15
  }).exec()
16
}
17

18
async function findPlanetByCoordinates(coordinates: IPlanetCoordinates) {
19
  return PlanetModel.findOne({
26✔
20
    coordinates
21
  }).exec()
22
}
23

24
async function insertPlanets(planets: IPlanet[]) {
NEW
25
  return PlanetModel.insertMany(planets)
×
26
}
27

28
// TODO: findPlanetsBySystem? => return all planets of a system
29

30
const planetRepository = {
4✔
31
  findPlanetById,
32
  findPlanetByCoordinates,
33
  findAvailablePrincipalPlanets,
34
  insertPlanets
35
}
36

37
export default planetRepository
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