jest-styled-components
jest-styled-components copied to clipboard
Allow multiple mofifiers for same test
Sometimes we have the same value passed to multiple modifiers and would be great to have this option
for example:
const myStyle = styled.button`
color: 'white'
&.something, &.something-else { color: 'blue' }
`
test('multiple modifiers', () => {
...other stuff
expect(myStyleTree).toHaveStyleRule('color', 'blue', {modifier: '.something, . something-else'}) // or passed as an array
})