Skip to content

Commit fa85582

Browse files
committed
fix: support for Aggressive Reporting
1 parent 7812dae commit fa85582

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/utils/resolve-to-testing-library-fn.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,12 @@ export const resolveToTestingLibraryFn = <
171171
}
172172

173173
const customModuleSetting = context.settings['testing-library/utils-module'];
174-
if (
175-
[...LIBRARY_MODULES, USER_EVENT_MODULE, customModuleSetting].some(
176-
(module) => module === maybeImport.source
177-
)
178-
) {
174+
const hasImportModuleMatch =
175+
[...LIBRARY_MODULES, USER_EVENT_MODULE].includes(maybeImport.source) ||
176+
(typeof customModuleSetting === 'string' &&
177+
maybeImport.source.endsWith(customModuleSetting));
178+
179+
if (hasImportModuleMatch) {
179180
return {
180181
original: maybeImport.imported,
181182
local: maybeImport.local,

0 commit comments

Comments
 (0)