Skip to content

[Bug] Terminal output is cut off while async test is executing #6590

@maxpatiiuk

Description

@maxpatiiuk

Describe the bug

If there is an async test and the number of tests in a file is more than the height of the terminal window, then the reporter output is cut off.
More specifically, any tests that are above the fold of the terminal are not visible until all tests complete.

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-zaoda8?file=test.spec.ts,vite.config.ts,package.json&initialPath=__vitest__/

Screen.Recording.2024-09-28.at.20.09.30.mov

Reproducible even with clearScreen:false Vite option.
Reproducible in Terminal, iTerm2 and VS Code terminal on macOS.
Reproducible in StackBlitz VS Code terminal.
Seems to happen regardless of terminal window size.

System Info

System:
    OS: macOS 14.6.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 98.42 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v20.16.0/bin/yarn
    npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
  Browsers:
    Chrome: 129.0.6668.60
    Safari: 18.0
  npmPackages:
    vite: ^5.2.0 => 5.4.8
    vitest: ^2.1.1 => 2.1.1

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    p3-significantHigh priority enhancement (priority)

    Type

    No type

    Projects

    Status

    Has plan

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions