Skip to content
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

WIP HTML Reporter: Fuzzy search using fuse #1441

Closed
wants to merge 9 commits into from

Conversation

ventuno
Copy link
Member

@ventuno ventuno commented May 16, 2020

Sample implementation of: #1438 (Fuse.js-based).
Below search results with different keywords (on test/index.html):

Search: "assert".
fuse assert

Search: "beforeEach".
fuse beforeEach

Search: "promiseaware".
fuse promiseaware

Search: "script".
fuse script

Copy link
Member

@trentmwillis trentmwillis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I like this implementation better than the fuzzysort one. A few questions, but once this is rebased onto master (since I merged the other PR) it's probably good to go.

.babelrc Show resolved Hide resolved
reporter/html.js Outdated Show resolved Hide resolved
reporter/html.js Outdated Show resolved Hide resolved
@ventuno
Copy link
Member Author

ventuno commented May 19, 2020

@trentmwillis closing this in favor of #1442 as I was having some trouble after fetching the latest upstream changes.

Also, I'm a little partial to the fuzzysort implementation just because the set of results looks a lot more predictable than Fuse.js (see attached screenshots). See for example the search for "beforeEach" where results almost looks sorted "at random" or "script" which returns a number of unrelated results.

If you feel strongly about Fuse.js, then let me try and play a little more with its configuration parameters and see if I can come up with better results. I would strongly recommend that you fetch both locally and try them and see the difference for yourself.

@ventuno ventuno closed this May 19, 2020
@ventuno ventuno deleted the ftr-1438-fuse-2 branch May 19, 2020 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants