Skip to content
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] Add yarn t support #1385

Closed
wants to merge 1 commit into from

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Apr 10, 2021

This is a follow-up of #1361. I'm trying to bring mui/material-ui#23369 to this repository. However, I'm facing a blocker with this line: const workspaceRoot = path.resolve(__dirname, '../');. It doesn't resolve to the correct root of this repository.

For prettier, we could get it working with this workaround: const workspaceRoot = process.cwd();

@eps1lon do you have a preference on the solution we take this time?

@@ -19,6 +19,7 @@
"prettier:all": "node ./scripts/prettier.js write",
"size:snapshot": "node --max-old-space-size=2048 ./scripts/sizeSnapshot/create",
"size:why": "yarn size:snapshot --analyze --accurateBundles",
"t": "node test/cli.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does t do? Can we rename?

Copy link
Member Author

@oliviertassinari oliviertassinari Apr 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is described in the pull request description: mui/material-ui#23369. It's meant to bring some of the jest capabilities around only running a subset of the tests and fast.

Copy link
Member Author

@oliviertassinari oliviertassinari Apr 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this command is experimental and I haven't received any feedback, I'm hesitant to document it.

Copy link
Member Author

@oliviertassinari oliviertassinari Apr 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the criteria for promoting the command from the experimental state to a stable one?

(When it comes to running tests in jsdom, I'm personally almost exclusively using yarn t over yarn test:watch).

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Apr 24, 2021

I'm closing. I have explored the feasibility of bringing this tool here. It has surfaced a structural issue. I'm surprised yarn t is still considered experimental. It has become my default test runner. It would be interesting to ask the other members of the team what they use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants