-
Notifications
You must be signed in to change notification settings - Fork 34
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
[Test]: Jest to Vitest migration caravan-client
package
#119
[Test]: Jest to Vitest migration caravan-client
package
#119
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Very nice! Reorganizing to a tests or test directory sounds good to me as well. Something also to consider as part of the larger #115 issue is to update the template generator and tooling packages to have and use a shared vitest config as well as update the shared tsconfig to include the vitest |
CI seems to be having trouble with this for some reason: https://github.com/caravan-bitcoin/caravan/actions/runs/10584531073/job/29340663941?pr=119 Have you tried running |
Thank you! yeah keeping a common vitest config file will be a great idea leveraging the power of monorepos : ) |
I've run the command in local and while running so I've observed that the process is not getting exit after completion, this might be the reason Github actions got cancelled after a certain time I think it will be good if we separate the linting, testing and building pipelines, and that too in both package and app folders (If files are changed and package folder/s than CI will run only for that not for app folder/s) this will reduce the GHA execution time. What are your thoughts on this @bucko13 ? |
it actually never canceled! I had to manually run it.
You can try that for sure, but just want to note that the CI is passing in other PRs. It's just this one where it gets stuck. |
okayyy! I've made minor changes in the test scripts and it seems like now ci is passing. |
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.
Nice! Glad it's passing now. Just a couple other small things (which should be reusable for the next rounds/packages!
caravan-client
pacakgecaravan-client
package
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.
So I started to look at some turborepo examples to reference because I was a little confused since you're not actually using the config anywhere as far as I can see (it's not extended or imported for example). And it looks like maybe it's overkill to do it in this way.
Here is an example from turborepo.
What I was thinking about though you can see in this example from turborepo for eslint where there is a base package and then it's imported and extended in sub packages as they're needed.
Perhaps that's not needed though and everything can share the same base vitest config at the root.
Sorry for the back and forth on this! Just wanting to make sure we get it right while we're in the process of refactoring.
Also, because you applied the import order in the base eslint, then all other packages inherit that rule, and now the lint step is failing. Either we should do those one at a time in the individual child configs and then can move that to the parent when they're all done, or don't add that rule yet and do that in a separate PR separate from the testing changes. I do like that rule and would like to add it, but I think it increases the scope of these efforts to upgrade testing (many more files in the diff!) |
Got your point here @bucko13 #119 (review) let me revert back the changes from the last commit and get back the vitest config file in the root itself. As of the comment here #119 (comment) yeah, it will be a good decision to open a separate PR for correcting the import orders from the codebase (Let me open one once this PR is merged) EDIT: I've reverted back the last commit. If it looks good let's merge : ) |
919d873
to
cb512ba
Compare
Jest to Vitest migration
caravan-client
packageRelated to #115
Screenshot
cc: @bucko13 @Legend101Zz