mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 10:00:42 +00:00
test: tighten trajectory cleanup path assertions
This commit is contained in:
@@ -32,7 +32,13 @@ function pointerFile(sessionId: string, runtimeFile: string): string {
|
||||
}
|
||||
|
||||
async function expectPathMissing(targetPath: string): Promise<void> {
|
||||
await expect(fs.stat(targetPath)).rejects.toMatchObject({ code: "ENOENT" });
|
||||
let statError: unknown;
|
||||
try {
|
||||
await fs.stat(targetPath);
|
||||
} catch (error) {
|
||||
statError = error;
|
||||
}
|
||||
expect((statError as NodeJS.ErrnoException | undefined)?.code).toBe("ENOENT");
|
||||
}
|
||||
|
||||
describe("trajectory cleanup", () => {
|
||||
|
||||
Reference in New Issue
Block a user