test(shared): isolate logger test overrides

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-18 13:09:55 +09:00
parent 21b782de93
commit 03f04ca3da
+5
View File
@@ -89,6 +89,11 @@ interface LoggerTestOverrides {
/** @internal test-only seam */
export function _setLoggerForTesting(overrides: LoggerTestOverrides): void {
buffer = []
if (flushTimer) {
clearTimeout(flushTimer)
flushTimer = null
}
if (overrides.filePath !== undefined) logFile = overrides.filePath
if (overrides.maxSizeBytes !== undefined) maxLogFileSizeBytes = overrides.maxSizeBytes
if (overrides.maxBackups !== undefined) maxLogFileBackups = overrides.maxBackups