mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 11:41:24 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -44,7 +44,9 @@ describe("startTelegramWebhook", () => {
|
||||
}),
|
||||
);
|
||||
const address = server.address();
|
||||
if (!address || typeof address === "string") throw new Error("no address");
|
||||
if (!address || typeof address === "string") {
|
||||
throw new Error("no address");
|
||||
}
|
||||
const url = `http://127.0.0.1:${address.port}`;
|
||||
|
||||
const health = await fetch(`${url}/healthz`);
|
||||
@@ -74,7 +76,9 @@ describe("startTelegramWebhook", () => {
|
||||
}),
|
||||
);
|
||||
const addr = server.address();
|
||||
if (!addr || typeof addr === "string") throw new Error("no addr");
|
||||
if (!addr || typeof addr === "string") {
|
||||
throw new Error("no addr");
|
||||
}
|
||||
await fetch(`http://127.0.0.1:${addr.port}/hook`, { method: "POST" });
|
||||
expect(handlerSpy).toHaveBeenCalled();
|
||||
abort.abort();
|
||||
|
||||
Reference in New Issue
Block a user