jest-styled-components icon indicating copy to clipboard operation
jest-styled-components copied to clipboard

Allow multiple mofifiers for same test

Open danielmariz opened this issue 3 years ago • 0 comments

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
})

danielmariz avatar Apr 15 '21 01:04 danielmariz