Skip to content

Commit

Permalink
Improve code highlighting in jest-emotion docs (#1329)
Browse files Browse the repository at this point in the history
  • Loading branch information
macklinu authored and emmatown committed Apr 28, 2019
1 parent 51e4856 commit b6eaf19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/jest-emotion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,22 @@ You can provide additional options for `toHaveStyleRule` matcher.
`target` - helps to specify css selector or other component
where style rule should be found.

```
```js
expect(tree).toHaveStyleRule('width', '50px', { target: ':hover' })
```

```
```js
expect(tree).toHaveStyleRule('color', 'yellow', { target: 'span' })
```

```
```js
expect(tree).toHaveStyleRule('fill', 'green', { target: `${Svg}` })
```

`media` - specifies the media rule where the matcher
should look for the style property.

```
```js
expect(tree).toHaveStyleRule('font-size', '14px', {
media: 'screen and (max-width: 1200px)'
})
Expand Down

0 comments on commit b6eaf19

Please sign in to comment.