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

rokucommunity / roku-debug / #1977

pending completion
#1977

push

TwitchBronBron
Fix issue with truncated debugger paths

999 of 1900 branches covered (52.58%)

Branch coverage included in aggregate %.

2082 of 3571 relevant lines covered (58.3%)

16.0 hits per line

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

11.54
/src/debugProtocol/responses/UndefinedResponse.ts
1
import { SmartBuffer } from 'smart-buffer';
1✔
2
import { UPDATE_TYPES } from '../Constants';
1✔
3

4
export class UndefinedResponse {
1✔
5

6
    constructor(buffer: Buffer) {
7
        // The minimum size of a undefined response
8
        if (buffer.byteLength >= 12) {
×
9
            try {
×
10
                let bufferReader = SmartBuffer.fromBuffer(buffer);
×
11
                this.requestId = bufferReader.readUInt32LE();
×
12

13
                // Updates will always have an id of zero because we didn't ask for this information
14
                if (this.requestId === 0) {
×
15
                    this.errorCode = bufferReader.readUInt32LE();
×
16
                    this.updateType = bufferReader.readUInt32LE();
×
17

18
                    // Only handle undefined events in this class
19
                    if (this.updateType === UPDATE_TYPES.UNDEF) {
×
20
                        this.data = bufferReader.readUInt8();
×
21
                        this.readOffset = bufferReader.readOffset;
×
22
                        this.success = true;
×
23
                    }
24
                }
25
            } catch (error) {
26
                // Could not process
27
            }
28
        }
29
    }
30
    public success = false;
×
31
    public readOffset = 0;
×
32

33
    // response fields
34
    public requestId = -1;
×
35
    public errorCode = -1;
×
36
    public updateType = -1;
×
37
    public data = -1;
×
38
}
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

© 2025 Coveralls, Inc