[code-infra] Vitest test migration#44325
Conversation
JCQuintas
left a comment
There was a problem hiding this comment.
I can't approve my own PR, so do as you wish, left comments, mostly for clarification, but everything looks good 👍
Thanks for the time put on this 😆
| # macOS-latest has 3 CPUs, but we get "EMFILE: too many open files" errors with that parallelism | ||
| # Limit Next.js to 2 CPUs to prevent file descriptor exhaustion. Empty string uses os.availableParallelism() | ||
| NEXT_PARALLELISM: ${{ runner.os == 'macOS' && '2' || '' }} | ||
| GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Why we need these now? 🤔
There was a problem hiding this comment.
Unrelated to this PR, but the docs build sometimes flakes without this token due to rate limiting in the github API when not authenticated. Was hitting this flakeyness while working on this PR
| } else { | ||
| id = this.currentTest?.fullTitle() ?? null; | ||
| } | ||
| const id = expect.getState().currentTestName; |
There was a problem hiding this comment.
Does it make sense to remove the isVitest func from this file now?
There was a problem hiding this comment.
Will do, was also planning a bigger cleanup and harmonization with X after this is merged
| function describeSkipIf(condition: boolean) { | ||
| return condition ? describe.skip : describe; | ||
| }; | ||
| const describeSkipIf = describe.skipIf; |
There was a problem hiding this comment.
We don't use this on X anymore, should we remove this file altogether?
| if (window.navigator.userAgent.includes('jsdom')) { | ||
| this.skip(); | ||
| } | ||
| it.skipIf(window.navigator.userAgent.includes('jsdom'))( |
There was a problem hiding this comment.
This reflow is so annoying to review 😆
There was a problem hiding this comment.
yeah, best to disable whitespace in github files view
|
|
||
| expect(() => { | ||
| setProps({ checked: true }); | ||
| globalThis.didWarnControlledToUncontrolled = true; |
packages/mui-utils/tsconfig.json
Outdated
| // Remove once: | ||
| // * vitest is at >= 3.2.0 | ||
| // * https://github.com/capricorn86/happy-dom/issues/1444 is solved |
There was a problem hiding this comment.
It seems this pr is using 4+ already, should these be removed?
Related to mui/mui-x#14508 and #43625
Help toward mui/mui-public#170
This also contains all the actual test changes to make material-ui repo run on vitest, while #43625 contains only config changes