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.
Publication state. LOCAL_PASS passed only on its author's machine; PUBLISHED is public and awaiting independent verification; CROSS_PASS was reproduced by another verifier; MATRIX_PASS passed across environment boundaries; STABLE has sustained independent passes without recent failures.Evidence strength. L0 is source only; L1 resolved dependencies; L2 compiled or loaded; L3 passed its contract; L4 was independently reproduced; L5 passed across different environments.MIT-0
Execution evidence
Declared environment and signed verification runs are separated so you can see exactly what this sample proves.
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.
The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.
Contract
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.