-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Add documentation for watch plugins #5895
Conversation
class. This receives a `jestHooks` argument that allows the plugin to hook into | ||
specific parts of the lifecycle of a test run. | ||
|
||
```javascript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about moving this up to it's own section "Plugin Class" that includes the whole interface?
This is great! The only thing missing is an explanation of how you register a plugin -- will that be through an option similar to |
Can we get this merged? |
Almost, although I wonder if we need points 1 and 2 of #5478 to be resolved first |
Should we stick the docs into |
I think as long as we can get this item in #5478 done, then things should be good! |
Just pinging this again. Can we merge this PR this week? |
what about just setting it to |
docs/WatchPlugins.md
Outdated
Below are the hooks available in Jest. | ||
#### `jestHooks.shouldRunTestSuite(testPath)` | ||
|
||
Returns a boolean to specify if a test should be run or not. It can return a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"It can return" -> "It returns"?
Codecov Report
@@ Coverage Diff @@
## master #5895 +/- ##
=======================================
Coverage 64.22% 64.22%
=======================================
Files 220 220
Lines 8481 8481
Branches 3 3
=======================================
Hits 5447 5447
Misses 3033 3033
Partials 1 1 Continue to review full report at Codecov.
|
class MyWatchPlugin { | ||
getUsageInfo(globalConfig) { | ||
return { | ||
key: 's'.codePointAt(0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is wrong, now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what should it be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just key: 's'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beauty
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
WIP: Do not merge
Contributes to #5478
This PR adds documentation for watch plugins.
It is still in a really rough spot, but feedback is more that welcome!!