Conversation
2c1a3a0 to
12e24b4
Compare
| "restoreMocks": true, | ||
| "testEnvironment": "node", | ||
| "testRegex": "((\\.)(test|spec))\\.js$" | ||
| "testRegex": "(\\.|_)(test|spec)\\.js$" |
There was a problem hiding this comment.
We could also remove spec, I don't believe it is used.
There was a problem hiding this comment.
Unfortunately we do use it. It would be nice to standardize on a test naming scheme, indeed. @NelsonBrandao is this perhaps an ecosystem issue? Is *.spec.js more widespread in frontend/React projects?
There was a problem hiding this comment.
@waldyrious Frontend does not use uphold-scripts.
There was a problem hiding this comment.
Is that circumstantial, or is the plan to never use it?
There was a problem hiding this comment.
Currently there are no plans to add it since some configurations are not compatible.
There was a problem hiding this comment.
Yes, but my question is, could they be made compatible? Or is there a fundamental rift we can't (or shouldn't) bridge?
There was a problem hiding this comment.
I don't think conceptually it makes sense to use uphold-scripts for both frontend and backend.
This package was created to automate menial tasks between all backend repos. The frontend uses a mono-repo to solve this very same problem so there is no need for uphold-scripts.
There was a problem hiding this comment.
Great, thanks for confirming. I'll remove "spec" from the regex, then! 🎉
89289f5 to
1cc2084
Compare
Is backend the only repo with such a format? If so, and since it doesn't even use jest, I'd say let's keep supporting one team convention only that all projects can converge to. Even if at some point we migrate backend to jest, it sounds like moving from one filename format to the other would be a reasonable step in such a migration (and far from the most painful one). |
Ah, I forgot to add an update to that bit. It's not the only one. It was the only one I was aware of when I created this PR, but I ran a search in the repos I have cloned locally (not all of our repos!): which returns 12 projects. (I didn't check whether each of those uses Jest, though.) That said, I do agree that we should converge to a single filename format, and have added to my personal list of tasks to work on (since we don't have a centralized place to track these issues...) |
1cc2084 to
667920f
Compare
|
From that list, at least http-errors uses jest. Still, instead of allowing both formats, WDYT about renaming those files instead on projects as we add uphold-scripts to them? To push for convergence of standards. |
Sounds good to me. Just ran a quick check for the packages already using uphold-scripts and none of them are in the list above. Will change. |
- Remove the "spec" part of the match, as none of the repos that use (or might use) uphold-scripts uses it - Remove the unused regex groups
667920f to
398da0e
Compare
|
Changes done. The regex is now just |
Uh oh!
There was an error while loading. Please reload this page.