-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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] Restore the t
command
#40430
[test] Restore the t
command
#40430
Conversation
Netlify deploy previewhttps://deploy-preview-40430--material-ui.netlify.app/ Bundle size report |
@@ -0,0 +1,15 @@ | |||
import { spawn } from 'node:child_process'; | |||
|
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.
Can you comment here and link to this PR (#40430)? We would likely never have set it up this way if we had started out with pnpm and so that makes the why documented for future generations.
Another thing we could do at some point is add some output saying "pnpm t <pattern>
is deprecated, use pnpm tw <pattern>
instead. This way of running the tests will be removed in a future version of the MUI core repository". This gives contributors enough time to adapt their muscle memory and us the option of removing the complexity of this script in the future.
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.
Approving already, but best to add that comment I mention. The rest of my review (in italics) is a suggestion and fully at your own discretion.
This change restores the pre-pnpm behavior of the
t
script.With yarn, it was possible to run the test CLI by executing
yarn t <test-pattern>
. However, pnpm treatst
as an alias fortest
. I introduced a small script that's run wheneverpnpm t
orpnpm test
is executed. It checks if it has any arguments and calls either the test CLI (previousyarn t
) or the extended validation suite (previouslyyarn test
)