-
Notifications
You must be signed in to change notification settings - Fork 147
Multiple utils-module for several test types #348
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
Hey @rosczja! I'm moving here your petition for allowing to set a list of modules into This is a feature that will take time to implement and won't happen soon to be honest. However, I'd like you to give us more info about your setup since it might be possible for you to achieve what you want with the current plugin version + ESLint Can you share more details about how you differentiate between those two types of tests? Do they have different filename suffix? Or perhaps are located under different folders? |
Hey @Belco90 , thank you very much. Yes, we differentiate between those two types by filename suffix. So you are right, I could try to use |
Alright. Assuming you use // .eslintrc
{
"plugins": [/* other plugins */, "testing-library"],
"extends": [/* other extends */, "plugin:testing-library/react"],
"overrides": [
{
// unit tests
"files": ["**/?(*.)+(spec|test).unit.[jt]s?(x)"],
settings: {
"testing-library/utils-module": "unit-test-utils"
}
},
{
// integration tests
"files": ["**/?(*.)+(spec|test).integration.[jt]s?(x)"],
settings: {
"testing-library/utils-module": "integration-test-utils"
}
}
],
}; However, if you have your tests files identified properly, I'd leave the new Aggressive Reporting doing its thing and run Let me know if any of these options work for you! |
@Belco90 I've seen this kind of snippet mentioned a couple of times (About using the file extension to separate files); Maybe it's worth documenting somewhere (like a FAQ or as part of the readme) |
@gndelia we added it to our README! |
🤦♂️ for me |
Hi @Belco90 , thanks again. Works for me, too. |
@rosczja I'm glad it works! I'm closing the issue then. |
Originally posted by @rosczja in #315 (comment)
The text was updated successfully, but these errors were encountered: