-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fuzzy Search #19
Comments
Yes! This is definitely on the roadmap. I was working on a PR for generalizing some of it to support globs, but the idea is that we should be able to support different search strategies. More info here #15 Since Jest 23.3 plugins can be configured, so I was thinking that it would result in a config like this.
|
Cool! I definitely see glob filtering being very useful as well! Hadn't occurred to me. What's cool about fuzzy is that it can be re-used maybe identically for the If you get the configuration system alone merged before advancing a lot of work into some of the specific search strategies perhaps we could work together in the And by the way, great work on the typeahead feature! It's one of my favorite things about Jest! 😍 |
That would limit the filter to "fuzzy", maybe making it an object? "watchPlugins": [
["jest-watch-typeahead", {
"filename": true | { ...filename matching config... },
"testname": true | { ...testname matching config... },
"fuzzy": true | { ...fuzzy config... }
}]
] |
Any progress or interest in this? This would save a massive amount of time finding tests in deeply nested paths. |
PR welcome 🙂 |
@SimenB do you think the fuzzy algorithm should become the default? My personal take on this would be that - yes, it would be great as a default. Not sure how do you feel about it though. I've looked at how VSCode handles this and it seems that they have a custom implementation:
I'm not really up to implementing still like this - I would much more prefer to just outsource this quickly to a handy npm package 😅 I've found this fuzzysearch and its implementation os very similar (but not the same) as the one in VSCode's |
Yes, fuzzy search should be the default! Send a PR :) |
So I've been waiting for the type-ahead to come back ever since it was removed a few versions ago so that I could propose a Fuzzy Search filtering in addition of (or replacement?) the already existing ones. I searched through the
jest
and this repo's issues and I've seen a few mentions of it but no formal discussion.Implementing it is sort-of straightforward since all the heavy lifting is already in place so I thought to give it a shot to have something to show on this issue, what I have in mind could look something like this:
Most developers are already familiar with the UX surrounding fuzzy searching and personally I would find it more useful than the regex ones in most cases, if not all.
So what does the team think? Is this something that could be included in this repo's roadmap? I volunteer to work on this if it is.
/cc @cpojer
The text was updated successfully, but these errors were encountered: