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

Get better truncation for testname typeahead by truncating the start and not the end #28

Merged
merged 7 commits into from
Mar 21, 2019

Conversation

rogeliog
Copy link
Member

This PR adds a better truncation strategy for the test name typeahead. Now that we are showing the describe blocks the text can be really long

We should truncate the start of the test name instead of the end, given that the end of the test name is the "it/test" description, which tends to be more relevant and specific.

This is similar to how the filename plugin works, where it truncates the first directories, but not the filename.

Before

aaaa-bfore

After

aaaa

@rogeliog rogeliog requested a review from SimenB March 16, 2019 06:03
@rogeliog rogeliog changed the title Better truncation for test names, by truncating the start and not the end Get better truncation for testname typeahead by truncating the start and not the end Mar 16, 2019
.prettierrc Show resolved Hide resolved
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

great idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants