mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 17:04:32 +00:00
test: guard inline keyboard fixture against undefined input
This commit is contained in:
committed by
Peter Steinberger
parent
a186036814
commit
4414af977a
@@ -147,7 +147,7 @@ describe("buildInlineKeyboard", () => {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
for (const testCase of cases) {
|
for (const testCase of cases) {
|
||||||
const input = testCase.input.map((row) => row.map((button) => ({ ...button })));
|
const input = testCase.input?.map((row) => row.map((button) => ({ ...button })));
|
||||||
expect(buildInlineKeyboard(input), testCase.name).toEqual(testCase.expected);
|
expect(buildInlineKeyboard(input), testCase.name).toEqual(testCase.expected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user