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

LukaJCB / ts-mls / 20944655171

13 Jan 2026 04:25AM UTC coverage: 95.199% (-0.5%) from 95.727%
20944655171

Pull #200

github

web-flow
Merge eec989c7f into 6f65b753e
Pull Request #200: Use CiphersuiteId instead of CiphersuiteName for internal values

412 of 421 branches covered (97.86%)

Branch coverage included in aggregate %.

193 of 208 new or added lines in 35 files covered. (92.79%)

6 existing lines in 3 files now uncovered.

2364 of 2495 relevant lines covered (94.75%)

72670.37 hits per line

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

77.78
/src/leafNodeSource.ts
1
import { decodeUint8, uint8Encoder } from "./codec/number.js"
2
import { Decoder, mapDecoderOption } from "./codec/tlsDecoder.js"
3
import { BufferEncoder, encode, Encoder } from "./codec/tlsEncoder.js"
4

5
/** @public */
6
export const leafNodeSources = {
3✔
7
  key_package: 1,
8
  update: 2,
9
  commit: 3,
10
} as const
11

12
/** @public */
13
export type LeafNodeSourceName = keyof typeof leafNodeSources
14
/** @public */
15
export type LeafNodeSourceValue = (typeof leafNodeSources)[LeafNodeSourceName]
16

17
const leafNodeSourceValues = new Set<number>(Object.values(leafNodeSources))
3✔
18

19
export function leafNodeSourceValueFromName(name: LeafNodeSourceName): LeafNodeSourceValue {
NEW
20
  return leafNodeSources[name]
×
21
}
22

23
export function isLeafNodeSourceValue(v: number): v is LeafNodeSourceValue {
NEW
24
  return leafNodeSourceValues.has(v)
×
25
}
26

27
export const leafNodeSourceValueEncoder: BufferEncoder<LeafNodeSourceValue> = uint8Encoder
3✔
28

29
export const encodeLeafNodeSourceValue: Encoder<LeafNodeSourceValue> = encode(leafNodeSourceValueEncoder)
3✔
30

31
export const decodeLeafNodeSourceValue: Decoder<LeafNodeSourceValue> = mapDecoderOption(decodeUint8, (v) =>
3✔
32
  leafNodeSourceValues.has(v) ? (v as LeafNodeSourceValue) : undefined,
11,122✔
33
)
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