This demonstrates a minimal case to reproduce a bug where MantineProvider
does not pass a theme
context to an @emotion/styled
component when using the component in a vitest
unit tests.
npm install
npm run dev
to see the component running athttp://localhost:5173/
npm run test:bad
to see the test fail when the component is wrapped in aMantineProvider
, becausetheme === {}
npm run test:good
to see the same test pass when the component is wrapped in an emotionThemeProvider