test: tighten exec path assertion · openclaw/openclaw@511290b
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -250,12 +250,9 @@ describe("exec PATH login shell merge", () => {
|
250 | 250 | |
251 | 251 | expect(entries).toEqual(["/usr/bin"]); |
252 | 252 | expect(shellPathMock).toHaveBeenCalledTimes(1); |
253 | | -expect(shellPathMock).toHaveBeenCalledWith( |
254 | | -expect.objectContaining({ |
255 | | -env: process.env, |
256 | | -timeoutMs: 1234, |
257 | | -}), |
258 | | -); |
| 253 | +const shellPathCall = shellPathMock.mock.calls[0]?.[0]; |
| 254 | +expect(shellPathCall?.env).toBe(process.env); |
| 255 | +expect(shellPathCall?.timeoutMs).toBe(1234); |
259 | 256 | } finally { |
260 | 257 | fs.rmSync(shellDir, { recursive: true, force: true }); |
261 | 258 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。