-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
There are a couple of issues in facebook/jest that propose the idea of supporting globs as a filtering mechanism. For example jestjs/jest#6422 and jestjs/jest#926
Now that configs for watch plugins got released, I think we can leverage that.
"watchPlugins": [
["jest-watch-typeahead/filename", {
"key": "g",
"filter": "glob",
"prompt": "filter by glob"
}]
]The implementation should not be that hard, given that we can use shouldRunTestSuite for it, it does come with a couple of problems though.
testPathPatternis a regex, which means that we would need to rely onshouldRunTestSuitewhen using a "filter" type that is not regex.- This means that pressing "c" to clear would only work when using regex. I think this is fine, we can show a stlightly different UI for the typeahead when it is not a regex for supporting that.
This is similar to how the
> Press "g" to filter by glob (current filter "**/e2e/**/*.js")jest-watch-select-projectswork. Althought we would also need another UI tweak to clear the filter
- This means that pressing "c" to clear would only work when using regex. I think this is fine, we can show a stlightly different UI for the typeahead when it is not a regex for supporting that.
vkrol, TSMMark and Mellbourn
Metadata
Metadata
Assignees
Labels
No labels