[code-infra] Package test utils#41177
Conversation
Netlify deploy previewhttps://deploy-preview-41177--material-ui.netlify.app/ Bundle size report |
81a85cf to
e6daedc
Compare
ed8881b to
98083f6
Compare
Janpot
left a comment
There was a problem hiding this comment.
Do we need to find more consensus cross team before fully committing to nx as a build tool?
|
Isn't it just a Core repo problem? If other repos use built packages from npm, we can still rely on pnpm. Or is there something more in the other repos that could benefit from a more advanced orchestrator? |
|
I'm just mentioning because I remember this coming up before with the X team in https://www.notion.so/mui-org/code-infra-Introduce-align-on-a-task-runner-ee2765d98ae74ec2bf9dca9b88a3561a#4356019bcc8e4900849fa1156eb7630d |
436079c to
d026fc6
Compare
bfe2f41 to
2144496
Compare
fc4fc4e to
f2aba3b
Compare
package.json
Outdated
| "test:e2e-website:dev": "cross-env PLAYWRIGHT_TEST_BASE_URL=http://localhost:3000 playwright test test/e2e-website --config test/e2e-website/playwright.config.ts", | ||
| "test:karma": "cross-env NODE_ENV=test karma start test/karma.conf.js", | ||
| "test:karma:profile": "cross-env NODE_ENV=test karma start test/karma.conf.profile.js", | ||
| "test:karma": "pnpm nx run nx_test_karma", |
There was a problem hiding this comment.
Is running nx through pnpm necessary here? In some commands it's running like this, In some other commands nx is run directly
| "test:karma": "pnpm nx run nx_test_karma", | |
| "test:karma": "nx run nx_test_karma", |
There was a problem hiding this comment.
👍 nx run is sufficient indeed.
Janpot
left a comment
There was a problem hiding this comment.
Looks good, hope I didn't miss anything scrolling through those renames 🙂
I added one question, no blocker.
After we merge this, I suppose we'd do the same for @mui-internal/api-docs-builder?
|
Yes, the API docs builder is next. It can be included in @mui/internal-scripts. |
|
@michaldudak thanks for this! Question: Previously, I was running unit tests with the |
|
I'm not aware of anything that could cause such an issue. I'll investigate. |
|
One issue I found (and fixed): #42519 |
|
I tested again both on your PR and the |
|
I have found a regression from this PR in HEAD, while I was trying to run a test. It crashes now:
vs. the commit just before:
@DiegoAndai I almost never use A side observation: I might sound like a broken record, but I'm still unable to see the net benefit of building the dependencies of test utils internal in http://github.com/mui/material-ui vs. consuming straight from the source. For a Pigment CSS dependency written in Rust, yes, OK: a higher fidelity npm publish experience feels more valuable, especially if nothing else downstream uses Rust. Opened #42572 to restore HEAD in a working state. |
This ensures that the code in this repo uses the same implementation of test-utils as other repos (for example making sure it doesn't use something that's not exported in the release build). |


Renames the @mui-internal/test-utils to @mui/internal-test-utils and prepares the package to be published to npm.