-
Notifications
You must be signed in to change notification settings - Fork 147
Allow multiple utils modules on Shared Settings #315
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
Comments
@CreativeTechGuy ok so I've been trying to implement the first approach for this but it's not so easy as I thought. Apart from changes mentioned in the description, all checks around custom test utils should be updated to look for specifiers on an array rather than a single string. The plugin is not ready for this, since it assumes it will have a single import, not several of them. This implies a lot of work, including corresponding tests to make sure different cases with several imports work as expected. For this reason, I think it's better to leave this as a future improvement for a 4.X release. What I can do now is rename the setting to something like |
Wow thank you for spending so much time on this suggestion. But I definitely agree, we should wait and see if there's any demand for it since it's a non-trivial change. |
No problem. I thought it would be a quick win, but it's not. I'm gonna close the ticket but reference it in v4 issue as a future improvement. |
I would definitely like to have this feature, but I understand that this is not trival to implement. We have two different types of tests: unit and integration. Both use a different custom render function and re-export testing-library stuff. Each type has its own module. |
It would be interesting to allow
"testing-library/utils-module"
to support multiple modules. For doing so:"testing-library/utils-module"
should expect an array of strings"testing-library/utils-module"
must be updated"testing-library/utils-module"
setisAggressiveModuleReportingEnabled
to check array length is greater than 0detectionInstructions
to check if some of the utils modules end with corresponding string.The text was updated successfully, but these errors were encountered: