Skip to content

Commit

Permalink
Remove object rest/spread notation to continue Node 6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Deverell committed Oct 15, 2018
1 parent 4f42010 commit 594362b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/toHaveStyleRule.js
Expand Up @@ -101,12 +101,13 @@ const getDeclaration = (rule, property) =>
const getDeclarations = (rules, property) =>
rules.map(rule => getDeclaration(rule, property)).filter(Boolean)

const normalizeOptions = ({ modifier, ...options }) =>
modifier
? {
...options,
modifier: Array.isArray(modifier) ? modifier.join('') : modifier,
}
const normalizeOptions = (options) =>
options.modifier
? Object.assign(
{},
options,
{ modifier: Array.isArray(options.modifier) ? options.modifier.join('') : options.modifier },
)
: options

function toHaveStyleRule(component, property, expected, options = {}) {
Expand Down

0 comments on commit 594362b

Please sign in to comment.