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

DaniSomoza / galactic-commander / 15029782185

14 May 2025 07:52PM UTC coverage: 47.664% (-4.4%) from 52.086%
15029782185

Pull #12

github

web-flow
Merge d58e631f3 into a8e301a23
Pull Request #12: [fleets] Explore planets

216 of 930 branches covered (23.23%)

Branch coverage included in aggregate %.

162 of 529 new or added lines in 56 files covered. (30.62%)

10 existing lines in 9 files now uncovered.

1569 of 2815 relevant lines covered (55.74%)

3.43 hits per line

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

42.86
/packages/game-engine/src/repositories/unitRepository.ts
1
import mongoose from 'mongoose'
2

3
import UnitModel from '../models/UnitModel'
4✔
4
import { IUnit } from '../types/IUnit'
5

6
async function findUnits() {
7
  return UnitModel.find({}).exec()
×
8
}
9

10
async function findUnitById(unitId: mongoose.Types.ObjectId) {
11
  return UnitModel.findById(unitId).exec()
×
12
}
13

14
async function findUnitByName(name: string) {
NEW
15
  return UnitModel.findOne({ name }).exec()
×
16
}
17

18
async function insertUnits(units: IUnit[]) {
19
  return UnitModel.insertMany(units)
×
20
}
21

22
const unitRepository = {
4✔
23
  findUnits,
24
  insertUnits,
25
  findUnitById,
26
  findUnitByName
27
}
28

29
export default unitRepository
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