test: tighten assertions and harness coverage

This commit is contained in:
Peter Steinberger
2026-05-08 05:27:57 +01:00
parent f62618f805
commit 9ef37d1907
822 changed files with 8918 additions and 6533 deletions

View File

@@ -143,9 +143,11 @@ describe("nodes-cli coverage", () => {
"overlay",
]);
expect(invoke).toBeTruthy();
expect(invoke?.params?.command).toBe("system.notify");
expect(invoke?.params?.params).toEqual({
if (!invoke) {
throw new Error("expected system.notify invocation");
}
expect(invoke.params?.command).toBe("system.notify");
expect(invoke.params?.params).toEqual({
title: "Ping",
body: "Gateway ready",
sound: undefined,
@@ -171,13 +173,15 @@ describe("nodes-cli coverage", () => {
"6000",
]);
expect(invoke).toBeTruthy();
expect(invoke?.params?.command).toBe("location.get");
expect(invoke?.params?.params).toEqual({
if (!invoke) {
throw new Error("expected location.get invocation");
}
expect(invoke.params?.command).toBe("location.get");
expect(invoke.params?.params).toEqual({
maxAgeMs: 1000,
desiredAccuracy: "precise",
timeoutMs: 5000,
});
expect(invoke?.params?.timeoutMs).toBe(6000);
expect(invoke.params?.timeoutMs).toBe(6000);
});
});