-
Notifications
You must be signed in to change notification settings - Fork 150
fix: Aggressive Reporting support in resolveToTestingLibraryFn #1043
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
base: main
Are you sure you want to change the base?
fix: Aggressive Reporting support in resolveToTestingLibraryFn #1043
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1043 +/- ##
==========================================
- Coverage 96.48% 96.46% -0.03%
==========================================
Files 49 50 +1
Lines 2678 2686 +8
Branches 1110 1106 -4
==========================================
+ Hits 2584 2591 +7
- Misses 94 95 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
const hasImportModuleMatch = | ||
[...LIBRARY_MODULES, USER_EVENT_MODULE].includes(maybeImport.source) || | ||
(typeof customModuleSetting === 'string' && | ||
maybeImport.source.endsWith(customModuleSetting)); |
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.
There are several utils related to detect Testing Library modules in lib/create-testing-library-rule/detect-testing-library-utils.ts
, perhaps we can reuse something here?
If not, we probably need to combine that module with this one at some point.
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.
You're absolutely right.
Taking this opportunity, I implemented a function(isTestingLibraryModule)to detect Testing Library modules.
Checks
Changes
testing-library/utils-module
inresolveToTestingLibraryFn
Context
Fixes #1038