UNPKG

ts-mls

Version:

[![CI](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml/badge.svg)](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/ts-mls.svg)](https://badge.fury.io/js/ts-mls) [![Coverage Status](https://co

13 lines 513 B
import json from "../../test_vectors/deserialization.json"; import { hexToBytes } from "@noble/ciphers/utils"; import { determineLength } from "../../src/codec/variableLength"; for (const [index, x] of json.entries()) { test(`deserialization test vectors ${index}`, () => { checkLength(x.vlbytes_header, x.length); }); } function checkLength(header, len) { const { length } = determineLength(hexToBytes(header)); expect(length).toBe(len); } //# sourceMappingURL=deserialization.test.js.map