mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-20 11:14:46 +00:00
test: guard message helper nullish deps
This commit is contained in:
@@ -109,10 +109,12 @@ function expectMessageCommandOptions(expected: Record<string, unknown>, callInde
|
||||
for (const [key, expectedValue] of Object.entries(expected)) {
|
||||
expect(options[key], `messageCommand options.${key}`).toEqual(expectedValue);
|
||||
}
|
||||
expect(call[1], "messageCommand runtime").not.toBeNull();
|
||||
expect(call[1], "messageCommand runtime").not.toBeUndefined();
|
||||
expect(call[2], "messageCommand deps").not.toBeNull();
|
||||
expect(call[2], "messageCommand deps").not.toBeUndefined();
|
||||
if (call[1] == null) {
|
||||
throw new Error("expected messageCommand runtime");
|
||||
}
|
||||
if (call[2] == null) {
|
||||
throw new Error("expected messageCommand deps");
|
||||
}
|
||||
}
|
||||
|
||||
describe("runMessageAction", () => {
|
||||
|
||||
Reference in New Issue
Block a user