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 devto see the component running athttp://localhost:5173/npm run test:badto see the test fail when the component is wrapped in aMantineProvider, becausetheme === {}npm run test:goodto see the same test pass when the component is wrapped in an emotionThemeProvider