Also parse the extras from the comment field
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user