-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Watch mode test pattern is global but it isn't quite obvious #2978
Comments
Currently, it only shows the name of the tests that are already cached. I agree that it makes the "t" pattern mode unpredictable... I wonder if we could add some messaging around it to make it less ambiguous 😄 |
Is it ever useful to run all tests matching a name globally? I understand why it's convenient to search tests globally by their descriptions, but once I've found the one I need, I just want to select that test alone and focus on it. (As an alternative to writing Fuzzy search for files make sense (e.g. if you use common prefixes or want to run all tests in a directory). But test descriptions are usually human readable so patterns don't work that well on them. Why not just treat Enter as selecting a test rather than running all tests that match entered pattern? |
I agree with @gaearon but I preferred to get this feature out so we can collect ideas on how to optimize it in future releases. There are two questions we need to answer here:
cc @zouxuoz |
I agree with @gaearon. @cpojer we missed really useful UX case and should resolve it. I think we can resolve it something like this:
I can send PR for resolve first and second points. |
I like that idea, it sounds really interesting |
I agree that the testNamePattern still needs more exploration to find the best UX |
Is there a way to disable this feature until it is more solid? We'd like to ship Jest 19 in the next |
(Another reason I'd like to disable it is because it can crash randomly: #2979) |
The reason I'm being a little bit obnoxious here is because I care deeply about the quality of Jest integration. Jest has had very weird issues in the past, and it took a lot of effort from @cpojer and @DmitriiAbramov to get it to the point where it’s good enough to be bundled by default in CRA. I’d like to make sure that we don’t drop that quality bar over time now that Jest is bundled. Unfortunately I don’t have time to work on this myself. 😞 |
What about hiding it form Watch Usage prompt until we make it work flawlessly? It would still be there but just hidden, because it's like still experimental feature? |
Yes, that would be perfect for us! |
(I guess you could still trigger it accidentally but I'm fine with that) |
Yeah, but it still tells you how to exit :D |
Or, maybe it makes sense to change the wording?
|
I don't know, up to you. I'd probably just hide it while it's confusing since it takes screen space. |
Oh, that's nice. 👍 |
as of #3253 is this good to go for now? |
We should bring back this mode and fix it before actually releasing Jest 20 (which is still a little while off, it seems :) ). |
Will this be released as 19.x though? Asking for integration of jest 19 into react-create-app |
We are probably not going to make another release to Jest 19. |
This will be fixed in Jest 20. |
Any timeline on Jest 20? 😄 |
I run
p
to choose a file:Then I wanted to filter to a single test with
t
:From this screen, it seems like it would only run this test. But nope, it seemingly runs the match on all files:
I'm not sure if this is intentional behavior or not, but it makes test pattern mode much less useful to me because I can never guess how many tests in other files may happen to share the same substring in their name. It's also never useful to me to filter all tests in the codebase by a word. I'd rather have take the exact match I chose with arrows than using the pattern I entered.
The text was updated successfully, but these errors were encountered: