test: tighten shared pid and node parsing coverage

This commit is contained in:
Peter Steinberger
2026-03-13 21:30:35 +00:00
parent 783d320547
commit 3a59d40109
2 changed files with 32 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ describe("shared/node-list-parse", () => {
expect(parseNodeList({ nodes: [{ nodeId: "node-1" }] })).toEqual([{ nodeId: "node-1" }]);
expect(parseNodeList({ nodes: "nope" })).toEqual([]);
expect(parseNodeList(null)).toEqual([]);
expect(parseNodeList(["not-an-object"])).toEqual([]);
});
it("parses node.pair.list payloads", () => {
@@ -20,5 +21,6 @@ describe("shared/node-list-parse", () => {
});
expect(parsePairingList({ pending: 1, paired: "x" })).toEqual({ pending: [], paired: [] });
expect(parsePairingList(undefined)).toEqual({ pending: [], paired: [] });
expect(parsePairingList(["not-an-object"])).toEqual({ pending: [], paired: [] });
});
});