test: tighten oauth lock path assertion · openclaw/openclaw@06eed5a
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,13 @@ import { captureEnv } from "../../test-utils/env.js";
|
6 | 6 | import { resolveOAuthRefreshLockPath } from "./paths.js"; |
7 | 7 | |
8 | 8 | async function expectPathMissing(targetPath: string): Promise<void> { |
9 | | -await expect(fs.stat(targetPath)).rejects.toMatchObject({ code: "ENOENT" }); |
| 9 | +try { |
| 10 | +await fs.stat(targetPath); |
| 11 | +} catch (error) { |
| 12 | +expect((error as NodeJS.ErrnoException).code).toBe("ENOENT"); |
| 13 | +return; |
| 14 | +} |
| 15 | +throw new Error(`Expected missing path: ${targetPath}`); |
10 | 16 | } |
11 | 17 | |
12 | 18 | describe("resolveOAuthRefreshLockPath", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。