• 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

71.43
/packages/game-engine/src/repositories/raceRepository.ts
1
import RaceModel from '../models/RaceModel'
4✔
2
import { IRace } from '../types/IRace'
3

4
async function findRaces() {
NEW
5
  return RaceModel.find({})
×
6
    .populate('researches')
7
    .populate({
8
      path: 'units',
9
      model: 'Unit',
10
      populate: {
11
        path: 'requirements.researches.research',
12
        model: 'Research'
13
      }
14
    })
15
    .exec()
16
}
17

18
async function findRaceById(raceId: string) {
19
  return RaceModel.findById(raceId).populate('researches').exec()
4✔
20
}
21

22
async function findRaceByName(name: string) {
23
  return RaceModel.findOne({ name }).exec()
23✔
24
}
25

26
async function insertRaces(races: IRace[]) {
NEW
27
  return RaceModel.insertMany(races)
×
28
}
29

30
const raceRepository = {
4✔
31
  findRaces,
32
  findRaceById,
33
  findRaceByName,
34
  insertRaces
35
}
36

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