Skip to content

CLI doesn't currently allow choosing filename test pattern until all tests are completed #3128

@ghiscoding

Description

@ghiscoding

Describe the bug

I'm migrating Jest unit tests to Vitest in Lerna-Lite (a very light fork of Lerna) and I need to use --no-threads because a few tests requires the use of process.chdir() and because of the no thread, it takes well over a 2min for all tests to complete and during that period the CLI is locked and I cannot use the CLI filename pattern. That's not the case in Jest, I can type in a pattern right after the CLI process starts. I'm on Windows and I know the Lerna/Lerna-Lite tests are running slower on Windows, so the fact that I'm on Windows might be worst for me but still I think the CLI should allow keyboard events even when the unit tests are being performed

Reproduction

Have a long running unit test suite and while it's running (and not completed), try choosing any CLI options while the test runs and you'll see that you can't. That's also true for all CLI commands, for example you can't Quit, by typing "q", until all unit tests are finished.

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 7.50 GB / 31.75 GB
  Binaries:
    Node: 16.17.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 8.15.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 111.0.5563.147
    Edge: Spartan (44.19041.1266.0), Chromium (111.0.1661.54)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @vitejs/plugin-vue: ^4.1.0 => 4.1.0
    @vitest/coverage-c8: ^0.29.8 => 0.29.8
    vite: ^4.2.1 => 4.2.1
    vitest: ^0.29.8 => 0.29.8

Used Package Manager

yarn

Validations

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions