mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-26 06:05:15 +00:00
test: tighten diffs store cleanup assertion
This commit is contained in:
@@ -141,9 +141,12 @@ describe("DiffArtifactStore", () => {
|
||||
vi.setSystemTime(new Date(now.getTime() + 2_000));
|
||||
await store.cleanupExpired();
|
||||
|
||||
await expect(fs.stat(path.dirname(standalone.filePath))).rejects.toMatchObject({
|
||||
code: "ENOENT",
|
||||
});
|
||||
const error = await fs.stat(path.dirname(standalone.filePath)).then(
|
||||
() => undefined,
|
||||
(statError: unknown) => statError,
|
||||
);
|
||||
expect(error).toBeInstanceOf(Error);
|
||||
expect((error as NodeJS.ErrnoException).code).toBe("ENOENT");
|
||||
});
|
||||
|
||||
it("supports image path aliases for backward compatibility", async () => {
|
||||
|
||||
Reference in New Issue
Block a user