fix(nextcloud-talk): fix onMessage return type in live integration tests

Array.push() returns number, not void. Wrap in block to satisfy
void | Promise<void> constraint.
This commit is contained in:
VivoKrei 2026-03-18 18:17:13 -04:00
parent b9a2d08593
commit 92bbfe1b08

View File

@ -42,7 +42,9 @@ describe("live integration: NC Talk attachment parsing pipeline", () => {
const h = await startWebhookServer({
path: "/live-1",
secret: SECRET,
onMessage: async (m) => msgs.push(m),
onMessage: async (m) => {
msgs.push(m);
},
});
const content = JSON.stringify({
message: "{file}",
@ -68,7 +70,9 @@ describe("live integration: NC Talk attachment parsing pipeline", () => {
const h = await startWebhookServer({
path: "/live-2",
secret: SECRET,
onMessage: async (m) => msgs.push(m),
onMessage: async (m) => {
msgs.push(m);
},
});
const content = JSON.stringify({
message: "{mention} sent a message",
@ -85,7 +89,9 @@ describe("live integration: NC Talk attachment parsing pipeline", () => {
const h = await startWebhookServer({
path: "/live-3",
secret: SECRET,
onMessage: async (m) => msgs.push(m),
onMessage: async (m) => {
msgs.push(m);
},
});
const { body, headers } = signed({ content: "Hello from Alice", name: "Hello from Alice" });
await fetch(h.webhookUrl, { method: "POST", headers, body });
@ -98,7 +104,9 @@ describe("live integration: NC Talk attachment parsing pipeline", () => {
const h = await startWebhookServer({
path: "/live-4",
secret: SECRET,
onMessage: async (m) => msgs.push(m),
onMessage: async (m) => {
msgs.push(m);
},
});
const content = JSON.stringify({
message: "{file}",
@ -124,7 +132,9 @@ describe("live integration: NC Talk attachment parsing pipeline", () => {
const h = await startWebhookServer({
path: "/live-5",
secret: SECRET,
onMessage: async (m) => msgs.push(m),
onMessage: async (m) => {
msgs.push(m);
},
});
const content = JSON.stringify({
message: "{f1} and {f2}",