jest-styled-components
jest-styled-components copied to clipboard
Feature request: Allow `toHaveStyleRule` to be called on global style
It would be great if global style as created by createGlobalStyle, could be tested in Jest using toHaveStyleRule.
For example:
let wrapper
beforeEach(() => {
wrapper = mount(<GlobalStyle />)
})
test('Should correctly render default GlobalStyle element', () => {
expect(wrapper).toHaveStyleRule('background-color', 'red')
expect(wrapper).toMatchSnapshot()
})
This has been mentioned multiple times in other issues. See #324