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

PeculiarVentures / ASN1.js / 14130271268

28 Mar 2025 01:41PM UTC coverage: 77.767% (-0.03%) from 77.8%
14130271268

push

github

web-flow
Merge pull request #114 from PeculiarVentures/update

Update dependencies and migrate testing framework to Jest

386 of 652 branches covered (59.2%)

102 of 113 new or added lines in 55 files covered. (90.27%)

16 existing lines in 7 files now uncovered.

1581 of 2033 relevant lines covered (77.77%)

5777.31 hits per line

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

81.82
/src/internals/LocalUtf8StringValueBlock.ts
1
import * as pvtsutils from "pvtsutils";
6✔
2
import {
6✔
3
  LocalSimpleStringBlock, LocalSimpleStringBlockJson, LocalSimpleStringBlockParams,
4
} from "./LocalSimpleStringBlock";
5

6
export type LocalUtf8StringValueBlockParams = LocalSimpleStringBlockParams;
7
export type LocalUtf8StringValueBlockJson = LocalSimpleStringBlockJson;
8

9
export class LocalUtf8StringValueBlock extends LocalSimpleStringBlock {
6✔
10
  public static override NAME = "Utf8StringValueBlock";
6✔
11

12
  public override fromBuffer(inputBuffer: ArrayBuffer | Uint8Array): void {
13
    this.valueBlock.valueHexView = pvtsutils.BufferSourceConverter.toUint8Array(inputBuffer);
2✔
14
    try {
2✔
15
      this.valueBlock.value = pvtsutils.Convert.ToUtf8String(inputBuffer);
2✔
16
    } catch (ex) {
UNCOV
17
      this.warnings.push(`Error during "decodeURIComponent": ${ex}, using raw string`);
×
18
      this.valueBlock.value = pvtsutils.Convert.ToBinary(inputBuffer);
×
19
    }
20
  }
21

22
  public override fromString(inputString: string): void {
23
    this.valueBlock.valueHexView = new Uint8Array(pvtsutils.Convert.FromUtf8String(inputString));
8✔
24
    this.valueBlock.value = inputString;
8✔
25
  }
26
}
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