[code-infra] `vitest` browser & jsdom modes
Related https://github.com/mui/material-ui/pull/43625
Minimal changes to have charts tests working in browser mode
Charts are the smallest test suit though
Help toward https://github.com/mui/mui-public/issues/170.
Currently ignoring DateFnsV3 adapter tests in the browser due to https://github.com/vitest-dev/vitest/issues/6483 they work normally in jsdom though.
Running tests
# all
pnpm vitest
# browser
pnpm vitest --project "browser/*"
# jsdom
pnpm vitest --project "jsdom/*"
Deploy preview: https://deploy-preview-14508--material-ui-x.netlify.app/
Generated by :no_entry_sign: dangerJS against 73c6a590eaa4bee4b7b1dd5951761d3316271b46
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
@LukasTy @flaviendelangle @noraleonte @arthurbalduini I think I've fixed most of the issues with date-pickers in vitest that I could without going super deep on how everything works 😅
I now need some help with understanding the current errors, and possible ideas on how to fix them.
You can check the current failing tests here: Vitest Tests (jsdom) Vitest Tests (browser)
This pull request has conflicts, please resolve those before we can evaluate the pull request.
@LukasTy had to move away from global overrides in favour of vi.mock because the later works correctly and with minimal required changes in both jsdom and browser. We just have to mock the mock function when running in mocha 😅
Changes are here: https://github.com/mui/mui-x/pull/14508/commits/2d5d395c26c9842a9014b205205699d55e2f554f
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.