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

Make matching case insensitive #18

Merged
merged 3 commits into from
Jul 8, 2018
Merged

Make matching case insensitive #18

merged 3 commits into from
Jul 8, 2018

Conversation

rogeliog
Copy link
Member

@rogeliog rogeliog commented Jul 6, 2018

Fixes: #10

testNamePattern is case insensitive, so the typeahead should respect that.

This was a regression introduced when I extracted the typeahead from Jest core.

context: { config },
})),
testPaths
.filter(testPath => (regex ? testPath.match(regex) : false))
Copy link
Member

Choose a reason for hiding this comment

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

can use .test as you only care about true/false, not the match

Copy link
Member

Choose a reason for hiding this comment

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

also, regex will always be truthy as this is inside if (regex)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, but Flow doesn't know that https://flow.org/en/docs/lang/refinements/#toc-refinement-invalidations

Although I think I can rewrite it a bit to avoid this.

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

2 participants