Also parse the extras from the comment field

This commit is contained in:
2026-03-18 13:11:16 +01:00
parent 78dbd3b0ef
commit b1cd8449d9
16 changed files with 754 additions and 493 deletions

View File

@@ -1,5 +1,6 @@
import { describe, it, expect } from "vitest";
import { Dissected } from "@hamradio/packet";
import { describe, expect, it } from "vitest";
import { Frame } from "../src/frame";
import { DataType, type UserDefinedPayload } from "../src/frame.types";
@@ -27,9 +28,7 @@ describe("Frame.decodeUserDefined", () => {
expect(res.payload.data).toBe("Hello world");
const raw = res.structure.find((s) => s.name === "user-defined");
const typeSection = res.structure.find(
(s) => s.name === "user-packet-type",
);
const typeSection = res.structure.find((s) => s.name === "user-packet-type");
const dataSection = res.structure.find((s) => s.name === "user-data");
expect(raw).toBeDefined();
expect(typeSection).toBeDefined();