Skip to content

Commit 284264c

Browse files
committed
test(nextcloud-talk): type command mock input
1 parent e5d686f commit 284264c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎extensions/nextcloud-talk/src/inbound.behavior.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ vi.mock("./room-info.js", async () => {
5050

5151
function installRuntime(params?: {
5252
buildMentionRegexes?: () => RegExp[];
53-
hasControlCommand?: (body: string) => boolean;
53+
hasControlCommand?: (body?: string) => boolean;
5454
matchesMentionPatterns?: (body: string, regexes: RegExp[]) => boolean;
5555
shouldHandleTextCommands?: () => boolean;
5656
}) {
@@ -356,7 +356,7 @@ describe("nextcloud-talk inbound behavior", () => {
356356
});
357357

358358
it("does not interpret rich-object display names as control commands", async () => {
359-
const hasControlCommand = vi.fn((body: string) => body.startsWith("/"));
359+
const hasControlCommand = vi.fn((body = "") => body.startsWith("/"));
360360
const coreRuntime = installRuntime({ hasControlCommand });
361361
createChannelPairingControllerMock.mockReturnValue({
362362
readStoreForDmPolicy: vi.fn(async () => []),

0 commit comments

Comments
 (0)