mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 02:40:43 +00:00
test: tighten assertions and harness coverage
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user