-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
Context: It seems that at some point, we should add a way to configure watch plugins. (still need to create an issue for that)
example:
"watchPlugins": [
["jest-watch-typeahead/filename", {
"key": "m",
"otherOption": true
}
]
I think we can leverage a lot of what we have here to create a robust typeahead solution. It would be awesome to support advance use cases, for example:
- Multiple
jest-watch-typeahad
pugins at the same time - Allow for custom filers strategies like:
glob
,regex
,startsWith
,exclude
,etc
.
NOTE: This assume that plugins are "configurable"
"watchPlugins": [
"jest-watch-typeahead/testname",
"jest-watch-typeahead/filename",
["jest-watch-typeahead",
{
"key": "x",
"type": "filename",
"prompt": "exclude file globs",
"strategy": "exclude-glob"
}
],
["jest-watch-typeahead",
{
"key": "m",
"type": "testname",
"prompt": "run typeahead powered by `my-filter`",
"strategy": "./my-filter.js"
}
],
]
This would add 4 plugins
> Press p to filter by filename...
> Press t to filter by test name...
> Press x to exclude file globs...
> Press m to run typeahead powered by `my-filter`...
pablopalacios
Metadata
Metadata
Assignees
Labels
No labels