mirror of https://github.com/openclaw/openclaw.git
test(fs-safe): assert directory-read errors never leak EISDIR text
This commit is contained in:
parent
6398a0ba8f
commit
00dcd931cb
|
|
@ -35,6 +35,9 @@ describe("fs-safe", () => {
|
|||
await expect(readLocalFileSafely({ filePath: dir })).rejects.toMatchObject({
|
||||
code: "not-file",
|
||||
});
|
||||
const err = await readLocalFileSafely({ filePath: dir }).catch((e: unknown) => e);
|
||||
expect(err).toBeInstanceOf(SafeOpenError);
|
||||
expect((err as SafeOpenError).message).not.toMatch(/EISDIR/i);
|
||||
});
|
||||
|
||||
it("enforces maxBytes", async () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue