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

haraka / Haraka / 26853218724

02 Jun 2026 11:03PM UTC coverage: 71.914% (-0.6%) from 72.494%
26853218724

Pull #3585

github

web-flow
Merge 6b45db3dd into 0907b64b5
Pull Request #3585: refactor: move rfc1869, FsyncWriteStream, TimerQueue to haraka-utils

1718 of 2286 branches covered (75.15%)

6 of 19 new or added lines in 4 files covered. (31.58%)

158 existing lines in 10 files now uncovered.

7574 of 10532 relevant lines covered (71.91%)

26.6 hits per line

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

85.19
/plugins/queue/discard.js
1
// discard
6✔
2

6✔
3
exports.register = function () {
6✔
UNCOV
4
    this.register_hook('queue', 'discard')
✔
UNCOV
5
    this.register_hook('queue_outbound', 'discard')
×
UNCOV
6
}
×
UNCOV
7

×
8
exports.discard = (next, connection) => {
6✔
9
    const txn = connection.transaction
7✔
10

7✔
11
    const q_wants = txn.notes.get('queue.wants')
7✔
12
    if (q_wants && q_wants !== 'discard') return next()
7!
13

7!
14
    function discard() {
7✔
15
        connection.loginfo('discarding message')
5✔
16
        // Pretend we delivered the message
5✔
17
        return next(OK)
5✔
18
    }
5✔
19

5✔
20
    if (connection.notes.discard) return discard()
7!
21
    if (txn.notes.discard) return discard()
7!
22
    if (q_wants === 'discard') return discard()
7!
23
    if (process.env.YES_REALLY_DO_DISCARD) return discard()
7✔
24

1✔
25
    // Allow other queue plugins to deliver
1!
26
    next()
1✔
27
}
1✔
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