У меня есть следующий тест:
it('should render the Name component correctly', () => {
const { asFragment } = render(
<ThemeProvider theme={theme}>
<Name variant="body1">Hello Test</Name>
</ThemeProvider>
)
expect(asFragment()).toMatchSnapshot()
})
const theme = createMuiTheme({
typography: {
fontFamily: 'Poppings'
},
palette: {
primary: {
main: primaryColor
},
secondary: {
main: secondaryColor
},
text: {
primary: primaryText,
secondary: secondaryText
}
}
})
export const LogoutButton = styled(Button)` ${({ theme }) => `
text-transform: none;
color: ${theme.palette.text.primary}
margin-left: 2rem;
font-size: ${fontSize}
&:hover {
text-decoration: underline;
background-color: transparent;
} `} `
, но он не проходит, и кажется, что палитра не проходит ... Есть ли какая-либо дополнительная конфигурация для библиотеки реагирующего тестирования, чтобы можно было использовать тема?
![enter image description here](https://i.stack.imgur.com/ca08W.png)