Skip to content

Commit

Permalink
Remove object rest/spread notation to continue Node 6 support (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
devrelm authored and MicheleBertoli committed Oct 21, 2018
1 parent 4f42010 commit c692a90
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 c692a90

Please sign in to comment.