mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
3.82k stars 1.13k forks source link

[test] Restore `t` command #12948

Closed LukasTy closed 2 weeks ago

LukasTy commented 3 weeks ago

Fixes https://github.com/mui/mui-x/issues/12935

Related to https://github.com/mui/material-ui/pull/40430

Core repo PR description:

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 treats t as an alias for test. I introduced a small script that's run whenever pnpm t or pnpm test is executed. It checks if it has any arguments and calls either the test CLI (previous yarn t) or the extended validation suite (previously yarn test)

mui-bot commented 3 weeks ago

Deploy preview: https://deploy-preview-12948--material-ui-x.netlify.app/

Generated by :no_entry_sign: dangerJS against 61e1a8f5a764418093e14d69c5f81b249b43e632

JCQuintas commented 3 weeks ago

Shouldn't we just use pnpm run test --? 😅 seems a script for this is a bit overkill.

Or pnpm run t -- depending on your use-case

LukasTy commented 3 weeks ago

Shouldn't we just use pnpm run test --? 😅 seems a script for this is a bit overkill.

You can use whatever you are most comfortable with. This is mainly to be in line with the Contributing guidelines, which are directly "inherited" from the mui/material-ui. Personally, I almost exclusively use test:unit --grep <whateverIWantToTest>. 🤷