test: silence planner fixture stderr

This commit is contained in:
Peter Steinberger
2026-03-28 11:53:14 +00:00
parent 241748ae60
commit 4757c32f63
2 changed files with 9 additions and 1 deletions

View File

@@ -1,8 +1,15 @@
import { EventEmitter } from "node:events";
import { PassThrough } from "node:stream";
import { afterEach, describe, expect, it, vi } from "vitest";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { importFreshModule } from "../helpers/import-fresh.js";
beforeEach(() => {
vi.spyOn(console, "log").mockImplementation(() => {});
vi.spyOn(console, "error").mockImplementation(() => {});
vi.spyOn(process.stdout, "write").mockImplementation(() => true);
vi.spyOn(process.stderr, "write").mockImplementation(() => true);
});
afterEach(() => {
vi.useRealTimers();
vi.restoreAllMocks();