fix(jest-transform): improve runtime errors and warnings#11998
fix(jest-transform): improve runtime errors and warnings#11998SimenB merged 5 commits intojestjs:mainfrom mrazauskas:fix-transformer-errors
Conversation
| } | ||
|
|
||
| async loadTransformers(): Promise<void> { | ||
| const makeInvalidTransformerError = (transformPath: string) => |
There was a problem hiding this comment.
It could also live outside the class, of course. The class is huge, not so easy to decide.
There was a problem hiding this comment.
makes sense to move it outside rather than defining it inline 🙂
There was a problem hiding this comment.
Or even better to move it to separate file together with other runtime errors for this module. Had to think a bit, will do it later.
There was a problem hiding this comment.
that also works - as you say the class is huge and somewhat hard to grok/navigate
|
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
Resolves #11955
It would be useful to provide more information if a user is attempting to import an invalid transformer module. Current message does not specify modules name. Hence, it may be hard to identify the problem.
This PR is an attempt to improve the error message.
Test plan
Updated the existing tests.