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

GrottoCenter / grottocenter-api / 10511865220

22 Aug 2024 04:19PM UTC coverage: 47.822% (-1.1%) from 48.96%
10511865220

push

github

vmarseguerra
feat(entities): adds delete / restore for entrance sub entities

711 of 2020 branches covered (35.2%)

Branch coverage included in aggregate %.

193 of 432 new or added lines in 35 files covered. (44.68%)

4 existing lines in 4 files now uncovered.

2528 of 4753 relevant lines covered (53.19%)

4.41 hits per line

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

35.71
/api/services/HistoryService.js
1
module.exports = {
1✔
2
  getEntranceHistories: async (entranceId, where = {}) => {
×
3
    if (!entranceId) return [];
1!
4
    return THistory.find({ ...where, entrance: entranceId })
1✔
5
      .populate('author')
6
      .populate('reviewer');
7
  },
8
  getEntranceHHistories: async (entranceId, where = {}) => {
×
9
    if (!entranceId) return [];
×
NEW
10
    const historyIds = await THistory.find({
×
11
      where: { ...where, entrance: entranceId },
12
      select: ['id'],
13
    });
NEW
14
    return module.exports.getHHistories(historyIds.map((e) => e.id));
×
15
  },
16

17
  getHistory: async (historyId) =>
18
    THistory.findOne({ id: historyId }).populate('author').populate('reviewer'),
2✔
19

20
  getHHistories: async (historyId) =>
UNCOV
21
    HHistory.find({ t_id: historyId }).populate('reviewer').populate('author'),
×
22
};
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