mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 14:38:25 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -103,7 +103,9 @@ describe("Slack native command argument menus", () => {
|
||||
registerSlackMonitorSlashCommands({ ctx: ctx as never, account: account as never });
|
||||
|
||||
const handler = commands.get("/usage");
|
||||
if (!handler) throw new Error("Missing /usage handler");
|
||||
if (!handler) {
|
||||
throw new Error("Missing /usage handler");
|
||||
}
|
||||
|
||||
const respond = vi.fn().mockResolvedValue(undefined);
|
||||
const ack = vi.fn().mockResolvedValue(undefined);
|
||||
@@ -132,7 +134,9 @@ describe("Slack native command argument menus", () => {
|
||||
registerSlackMonitorSlashCommands({ ctx: ctx as never, account: account as never });
|
||||
|
||||
const handler = actions.get("openclaw_cmdarg");
|
||||
if (!handler) throw new Error("Missing arg-menu action handler");
|
||||
if (!handler) {
|
||||
throw new Error("Missing arg-menu action handler");
|
||||
}
|
||||
|
||||
const respond = vi.fn().mockResolvedValue(undefined);
|
||||
await handler({
|
||||
@@ -158,7 +162,9 @@ describe("Slack native command argument menus", () => {
|
||||
registerSlackMonitorSlashCommands({ ctx: ctx as never, account: account as never });
|
||||
|
||||
const handler = actions.get("openclaw_cmdarg");
|
||||
if (!handler) throw new Error("Missing arg-menu action handler");
|
||||
if (!handler) {
|
||||
throw new Error("Missing arg-menu action handler");
|
||||
}
|
||||
|
||||
const respond = vi.fn().mockResolvedValue(undefined);
|
||||
await handler({
|
||||
@@ -186,7 +192,9 @@ describe("Slack native command argument menus", () => {
|
||||
registerSlackMonitorSlashCommands({ ctx: ctx as never, account: account as never });
|
||||
|
||||
const handler = actions.get("openclaw_cmdarg");
|
||||
if (!handler) throw new Error("Missing arg-menu action handler");
|
||||
if (!handler) {
|
||||
throw new Error("Missing arg-menu action handler");
|
||||
}
|
||||
|
||||
await handler({
|
||||
ack: vi.fn().mockResolvedValue(undefined),
|
||||
@@ -208,7 +216,9 @@ describe("Slack native command argument menus", () => {
|
||||
registerSlackMonitorSlashCommands({ ctx: ctx as never, account: account as never });
|
||||
|
||||
const handler = actions.get("openclaw_cmdarg");
|
||||
if (!handler) throw new Error("Missing arg-menu action handler");
|
||||
if (!handler) {
|
||||
throw new Error("Missing arg-menu action handler");
|
||||
}
|
||||
|
||||
await handler({
|
||||
ack: vi.fn().mockResolvedValue(undefined),
|
||||
|
||||
Reference in New Issue
Block a user