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

lad-tech / nsc-toolkit / 12909700734

22 Jan 2025 01:53PM UTC coverage: 81.018% (+0.4%) from 80.576%
12909700734

push

github

web-flow
fix: rollup pull consumer (#142)

* fix: rollup pull consumer

* debug: fix test

---------

Co-authored-by: gleip <kuchinsn@lad24.ru>

362 of 476 branches covered (76.05%)

Branch coverage included in aggregate %.

3 of 5 new or added lines in 3 files covered. (60.0%)

880 of 1057 relevant lines covered (83.25%)

4.96 hits per line

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

90.0
/src/StreamSingleMsgFetcher.ts
1
import { Consumer } from 'nats';
2

3
export class StreamSingleMsgFetcher {
4✔
4
  private done = false;
1✔
5

6
  constructor(private consumer: Consumer) {}
1✔
7

8
  [Symbol.asyncIterator]() {
9
    return {
1✔
10
      next: async () => {
11
        const msg = await this.consumer.next();
2✔
12
        if (msg) {
2✔
13
          return {
2✔
14
            value: msg,
15
            done: this.done,
16
          };
17
        }
18

NEW
19
        return { done: false };
×
20
      },
21
    };
22
  }
23

24
  public unsubscribe() {
25
    this.done = true;
1✔
26
  }
27
}
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