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

GrottoCenter / grottocenter-api / 10996210778

23 Sep 2024 02:17PM UTC coverage: 46.158% (-2.8%) from 48.952%
10996210778

Pull #1306

github

vmarseguerra
feat(entities): adds delete / restore for document
Pull Request #1306: Adds delete / restore for entrance sub entities

740 of 2203 branches covered (33.59%)

Branch coverage included in aggregate %.

526 of 1293 new or added lines in 114 files covered. (40.68%)

23 existing lines in 18 files now uncovered.

2462 of 4734 relevant lines covered (52.01%)

4.5 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 = {
2✔
2
  getEntranceHistories: async (entranceId, where = {}) => {
×
3
    if (!entranceId) return [];
8!
4
    return THistory.find({ ...where, entrance: entranceId })
8✔
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