mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 04:40:23 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -158,7 +158,9 @@ describe("runWithModelFallback", () => {
|
||||
},
|
||||
});
|
||||
const run = vi.fn().mockImplementation(async (providerId, modelId) => {
|
||||
if (providerId === "fallback") return "ok";
|
||||
if (providerId === "fallback") {
|
||||
return "ok";
|
||||
}
|
||||
throw new Error(`unexpected provider: ${providerId}/${modelId}`);
|
||||
});
|
||||
|
||||
@@ -219,7 +221,9 @@ describe("runWithModelFallback", () => {
|
||||
},
|
||||
});
|
||||
const run = vi.fn().mockImplementation(async (providerId) => {
|
||||
if (providerId === provider) return "ok";
|
||||
if (providerId === provider) {
|
||||
return "ok";
|
||||
}
|
||||
return "unexpected";
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user