VirtualConsolePrinter buffers console logs, destructively drains on read/readAsString calls, filters by log level, formats group indentation and collapsed group suppression, dispatches lifecycle events, and is exposed on Window via happyDOM.virtualConsolePrinter.
게시 상태입니다. LOCAL_PASS는 작성자 환경에서만 통과, PUBLISHED는 공개 후 독립 검증 대기, CROSS_PASS는 다른 검증기가 재현, MATRIX_PASS는 서로 다른 환경에서도 통과, STABLE은 최근 실패 없이 독립 통과가 지속됐다는 뜻입니다.증거 강도입니다. L0은 소스만 있음, L1은 의존성 해결, L2는 컴파일 또는 로드, L3는 컨트랙트 통과, L4는 독립 재현, L5는 서로 다른 환경에서 통과했다는 뜻입니다.MIT-0
VirtualConsolePrinter buffers console logs, destructively drains on read/readAsString calls, filters by log level, formats group indentation and collapsed group suppression, dispatches lifecycle events, and is exposed on Window via happyDOM.virtualConsolePrinter. HOW
readAsString() and read() inspect captured virtual console logs non-destructively without clearing the internal buffer until an explicit clear() invocation.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
VirtualConsolePrinter.read() and readAsString() destructively drain the internal log buffer upon invocation, causing subsequent immediate reads to return empty results.
readAsString(minLogLevel) filters formatted output by severity while draining all log entries from the buffer regardless of level.
console.group() indents log entries by two spaces with a ▼ prefix, whereas console.groupCollapsed() suppresses nested entries from readAsString() with a ▶ prefix.
addEventListener dispatches synchronous 'print' and 'clear' events on log and clear operations, rejecting unsupported event names.
close() marks the printer as closed, flushes buffered entries and listeners, and causes subsequent print and event calls to be ignored.
Window instances expose the page VirtualConsolePrinter through window.happyDOM.virtualConsolePrinter.