diff --git a/README.md b/README.md index 583ef7b..099a4a6 100644 --- a/README.md +++ b/README.md @@ -306,16 +306,34 @@ test('it works', () => { # toHaveStyleRule The `toHaveStyleRule` matcher is useful to test if a given rule is applied to a component. -The first argument is the expected property, the second is the expected value (string or RegExp). +The first argument is the expected property, the second is the expected value which can be a String, RegExp, Jest asymmetric matcher or `undefined`. ```js -test('it works', () => { +const Button = styled.button` + color: red; + border: 0.05em solid ${props => props.transparent ? 'transparent' : 'black'}; + cursor: ${props => !props.disabled && 'pointer'}; + opacity: ${props => props.disabled && '.65'}; +` + +test('it applies default styles', () => { const tree = renderer.create(