Skip to content

Terminal cursor is not restored with --typecheck in run mode #5247

@posva

Description

@posva

Describe the bug

When running vitest run with typecheck, the cursor is not correctly restored.

Reproduction

Running npm run test:run will keep the cursor hidden after finishing running the test. Not using --typecheck, not having .test-d.ts files, or running in dev mode does not show this problem.

The cursor can be forced restored by the user with tput cnorm or reset commands.

System Info

System:
    OS: macOS 14.3.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 55.56 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - ~/.volta/tools/image/node/20.9.0/bin/node
    npm: 10.1.0 - ~/.volta/tools/image/node/20.9.0/bin/npm
    pnpm: 8.15.1 - ~/.volta/bin/pnpm
  npmPackages:
    @vitest/ui: latest => 1.3.0
    vite: latest => 5.1.3
    vitest: latest => 1.3.0

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat: typecheckIssues and PRs related to typechecking featurep3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions