mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:40:43 +00:00
chore(lint): enable additional cleanup rules
This commit is contained in:
@@ -144,7 +144,7 @@ function writeTrustedOpenClawBinFixture(
|
||||
}
|
||||
|
||||
afterEach(() => {
|
||||
for (const dir of tempDirs.splice(0, tempDirs.length)) {
|
||||
for (const dir of tempDirs.splice(0)) {
|
||||
fs.rmSync(dir, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
@@ -26,9 +26,7 @@ describe("registerTelegramNativeCommands skill allowlist integration", () => {
|
||||
resetNativeCommandMenuMocks();
|
||||
resetPluginCommandMocks();
|
||||
await Promise.all(
|
||||
tempDirs
|
||||
.splice(0, tempDirs.length)
|
||||
.map((dir) => fs.rm(dir, { recursive: true, force: true })),
|
||||
tempDirs.splice(0).map((dir) => fs.rm(dir, { recursive: true, force: true })),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -256,11 +256,9 @@ describe("createTelegramBot channel_post media", () => {
|
||||
});
|
||||
sendMessageSpy.mockClear();
|
||||
replySpy.mockClear();
|
||||
const fetchSpy = vi
|
||||
.spyOn(globalThis, "fetch")
|
||||
.mockImplementation(async () =>
|
||||
Promise.reject(new Error("MediaFetchError: Failed to fetch media")),
|
||||
);
|
||||
const fetchSpy = vi.spyOn(globalThis, "fetch").mockImplementation(async () => {
|
||||
throw new Error("MediaFetchError: Failed to fetch media");
|
||||
});
|
||||
|
||||
try {
|
||||
createTelegramBot({ token: "tok" });
|
||||
|
||||
Reference in New Issue
Block a user