Repository navigation
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.
|
| } | ||
| export interface WatchPluginClass { | ||
| new (options: { | ||
| config: Record<string, unknown>; |
There was a problem hiding this comment.
which config is this? can we type it better?
There was a problem hiding this comment.
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.
aha, it's the options provided directly to the plugin, gotcha 👍
There was a problem hiding this comment.
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?
You can use https://github.com/facebook/jest/blob/53420f8904a80d0e1b52c9a79ae5556dcc6c506b/e2e/runJest.ts#L152
Thanks for the information. I've added a |
|
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