test: tighten auth session override assertion · openclaw/openclaw@98078ea
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -156,9 +156,13 @@ describe("resolveSessionAuthProfileOverride", () => {
|
156 | 156 | |
157 | 157 | expect(resolved).toBeUndefined(); |
158 | 158 | expect(authStoreMocks.ensureAuthProfileStore).not.toHaveBeenCalled(); |
159 | | -await expect(fs.access(`${agentDir}/auth-profiles.json`)).rejects.toMatchObject({ |
160 | | -code: "ENOENT", |
161 | | -}); |
| 159 | +try { |
| 160 | +await fs.access(`${agentDir}/auth-profiles.json`); |
| 161 | +} catch (error) { |
| 162 | +expect((error as NodeJS.ErrnoException).code).toBe("ENOENT"); |
| 163 | +return; |
| 164 | +} |
| 165 | +throw new Error("Expected auth-profiles.json to be absent"); |
162 | 166 | }); |
163 | 167 | }); |
164 | 168 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。