test(infra): assert dotenv logger warning sink · openclaw/openclaw@fc2d957
clawsweeper
·
2026-04-30
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -188,12 +188,12 @@ describe("loadDotEnv", () => {
|
188 | 188 | ); |
189 | 189 | |
190 | 190 | vi.spyOn(process, "cwd").mockReturnValue(cwdDir); |
191 | | -const warn = vi.spyOn(console, "warn").mockImplementation(() => undefined); |
| 191 | +loggerMocks.warn.mockClear(); |
192 | 192 | |
193 | 193 | loadDotEnv({ quiet: true }); |
194 | 194 | |
195 | 195 | expect(process.env.FOO).toBe("from-shell"); |
196 | | -expect(warn).not.toHaveBeenCalled(); |
| 196 | +expect(loggerMocks.warn).not.toHaveBeenCalled(); |
197 | 197 | }); |
198 | 198 | }); |
199 | 199 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。