Bug fixes in structure parsing
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user