Problem
silencedConsole() silences all five console methods (log, error, warn, info, debug) unconditionally. This masks unexpected console output that might reveal bugs, and developers default to silencing everything because it's the path of least resistance.
Context
The utility lives in packages/factory/src/test-utils.ts and is used across ~20 test call sites. Most callers only need to silence error (they're testing error paths). Three callers assert on specific methods (silent.error, silent.warn).
Solution
Make the methods parameter required so callers must specify which console methods to silence. The return type narrows to only include the requested methods, giving a compile-time error if a caller asserts on a method they didn't silence.
silencedConsole(['error']) // → { error: MockInstance } & Disposable
silencedConsole(['error', 'warn']) // → { error: MockInstance; warn: MockInstance } & Disposable
All existing call sites move to silencedConsole(['error']). The three assertion sites keep their current method lists.
Acceptance criteria
Problem
silencedConsole()silences all five console methods (log,error,warn,info,debug) unconditionally. This masks unexpected console output that might reveal bugs, and developers default to silencing everything because it's the path of least resistance.Context
The utility lives in
packages/factory/src/test-utils.tsand is used across ~20 test call sites. Most callers only need to silenceerror(they're testing error paths). Three callers assert on specific methods (silent.error,silent.warn).Solution
Make the
methodsparameter required so callers must specify which console methods to silence. The return type narrows to only include the requested methods, giving a compile-time error if a caller asserts on a method they didn't silence.All existing call sites move to
silencedConsole(['error']). The three assertion sites keep their current method lists.Acceptance criteria
silencedConsolerequires an array of method names (no default "all" behavior)