-
-
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
feat(jest-core): add support for watchPlugins
written in ESM
#11315
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11315 +/- ##
==========================================
- Coverage 64.19% 64.17% -0.02%
==========================================
Files 308 308
Lines 13528 13528
Branches 3297 3297
==========================================
- Hits 8684 8682 -2
- Misses 4131 4132 +1
- Partials 713 714 +1
Continue to review full report at Codecov.
|
@@ -83,6 +83,7 @@ export interface WatchPlugin { | |||
} | |||
export interface WatchPluginClass { | |||
new (options: { | |||
config: Record<string, unknown>; |
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.
which config is this? can we type it better?
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 comes from this line https://github.com/facebook/jest/pull/11315/files#diff-a57e387ae1cb6024df7880be7f3bfd013b02353755bf3b7901d21102332b5281L192 which is already Record<string, unknown>
. I need to add that prop otherwise https://github.com/facebook/jest/pull/11315/files#diff-a57e387ae1cb6024df7880be7f3bfd013b02353755bf3b7901d21102332b5281R198 will complain
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.
aha, it's the options provided directly to the plugin, gotcha 👍
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.
the plugins aren't activate unless you use --watch
, are they? Could you make the plugins write something to stdout and assert it's there or something just so we're sure it works?
Thanks for the information. I've added 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.
Thanks!
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. |
Summary
Related to #11167
Test plan
Adjusted unit test and added e2e tests
Green CI