cel-tui
    Preparing search index...

    Class MockTerminal

    In-memory terminal for testing.

    Captures all written output into a buffer and allows setting fixed dimensions. No real I/O.

    Implements

    Index

    Constructors

    Properties

    output: string = ""

    All output written to the terminal.

    Accessors

    • get columns(): number

      Terminal width in columns.

      Returns number

    • get rows(): number

      Terminal height in rows.

      Returns number

    Methods

    • Simulate keyboard input.

      Parameters

      • data: string

      Returns void

    • Simulate terminal resize.

      Parameters

      • columns: number
      • rows: number

      Returns void

    • Enter raw mode, enable Kitty level 1 keyboard reporting, enable bracketed paste mode, enable mouse tracking, and hide the cursor.

      The framework prefers Kitty semantics but its parser also accepts mixed tmux/legacy keyboard encodings that may still arrive on stdin.

      Parameters

      • onInput: (data: string) => void
      • onResize: () => void

      Returns void