Bug fixes in structure parsing

This commit is contained in:
2026-03-16 13:16:06 +01:00
parent 16f638301b
commit 38b617728c
5 changed files with 31 additions and 20 deletions

View File

@@ -837,19 +837,19 @@ describe("Packet dissection with sections", () => {
expect(result.structure).toBeDefined();
expect(result.structure.length).toBeGreaterThan(0);
const routingSection = result.structure.find((s) => s.name === "Routing");
const routingSection = result.structure.find((s) => s.name === "routing");
expect(routingSection).toBeDefined();
expect(routingSection?.fields).toBeDefined();
expect(routingSection?.fields?.length).toBeGreaterThan(0);
const sourceField = routingSection?.fields?.find(
(a) => a.name === "Source address",
(a) => a.name === "source address",
);
expect(sourceField).toBeDefined();
expect(sourceField?.length).toBeGreaterThan(0);
const destField = routingSection?.fields?.find(
(a) => a.name === "Destination address",
(a) => a.name === "destination address",
);
expect(destField).toBeDefined();
expect(destField?.length).toBeGreaterThan(0);