diff --git a/src/infra/dotenv.test.ts b/src/infra/dotenv.test.ts index 9ac0bb4fa5e..2abe07764f4 100644 --- a/src/infra/dotenv.test.ts +++ b/src/infra/dotenv.test.ts @@ -188,12 +188,12 @@ describe("loadDotEnv", () => { ); vi.spyOn(process, "cwd").mockReturnValue(cwdDir); - const warn = vi.spyOn(console, "warn").mockImplementation(() => undefined); + loggerMocks.warn.mockClear(); loadDotEnv({ quiet: true }); expect(process.env.FOO).toBe("from-shell"); - expect(warn).not.toHaveBeenCalled(); + expect(loggerMocks.warn).not.toHaveBeenCalled(); }); }); });