[Enter] key in watch mode has unexpected behavior #6092
Closed
nathanmmiller
started this conversation in
Feedback
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In both jest and vitest, when running watch mode, you can specify a filter to run on via 'p' or 't'. For example, you may have run watch mode on all tests but decide you want only to rerun foo.test.js for a while, so you'd type 'p' and then type 'foo' and [enter] and go from there. On every subsequent rerun, it should run only foo.test.js until you leave that filter.
In jest, this works as expected - a rerun caused by HMR or by the [enter] key will run only foo.test.js.
In vitest, this only half works as expected - a rerun caused by HMR will run only foo.test.js. However, a rerun caused by the [enter] key will rerun all tests. Oddly, this does not clear the filter. Once all tests are done, HMR will again rerun only foo.test.js.
I believe this is a bug - I believe that [enter] in a watch mode terminal should respect any current filters.
Beta Was this translation helpful? Give feedback.
All reactions