mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:01:37 +00:00
test: remove redundant rotate missing-file no-op case
This commit is contained in:
@@ -231,14 +231,6 @@ describe("rotateSessionFile", () => {
|
|||||||
expect(bakFiles.length).toBeLessThanOrEqual(3);
|
expect(bakFiles.length).toBeLessThanOrEqual(3);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("non-existent file: no rotation (returns false)", async () => {
|
|
||||||
const missingPath = path.join(testDir, "missing.json");
|
|
||||||
|
|
||||||
const rotated = await rotateSessionFile(missingPath, 100);
|
|
||||||
|
|
||||||
expect(rotated).toBe(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("backup file name includes a timestamp", async () => {
|
it("backup file name includes a timestamp", async () => {
|
||||||
await fs.writeFile(storePath, "x".repeat(100), "utf-8");
|
await fs.writeFile(storePath, "x".repeat(100), "utf-8");
|
||||||
const before = Date.now();
|
const before = Date.now();
|
||||||
|
|||||||
Reference in New Issue
Block a user