mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 12:30:44 +00:00
test: tighten oauth lock path assertion
This commit is contained in:
@@ -6,7 +6,13 @@ import { captureEnv } from "../../test-utils/env.js";
|
||||
import { resolveOAuthRefreshLockPath } from "./paths.js";
|
||||
|
||||
async function expectPathMissing(targetPath: string): Promise<void> {
|
||||
await expect(fs.stat(targetPath)).rejects.toMatchObject({ code: "ENOENT" });
|
||||
try {
|
||||
await fs.stat(targetPath);
|
||||
} catch (error) {
|
||||
expect((error as NodeJS.ErrnoException).code).toBe("ENOENT");
|
||||
return;
|
||||
}
|
||||
throw new Error(`Expected missing path: ${targetPath}`);
|
||||
}
|
||||
|
||||
describe("resolveOAuthRefreshLockPath", () => {
|
||||
|
||||
Reference in New Issue
Block a user