Skip to content

Commit

Permalink
Tests: omit cutted quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
vkalinichev committed Dec 13, 2016
1 parent f8c4e1f commit 9926ba1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ test( 'Should NOT add [dir] prefix to symmetric rules', t => run( t,
test( 'Should ONLY create LTR & RTL rules to asymmetric rules', t => run( t,
'a { font-size: 1em; text-align: left }',
'a { font-size: 1em } ' +
'[dir="ltr"] a { text-align: left } ' +
'[dir="rtl"] a { text-align: right }'
'[dir=ltr] a { text-align: left } ' +
'[dir=rtl] a { text-align: right }'
) )

test( 'Should add [dir] prefix to symmetric rules with direction related declarations', t => run( t,
Expand All @@ -37,35 +37,35 @@ test( 'Should add [dir] prefix to symmetric rules with direction related declara
test( 'Should add [dir] prefix to symmetric rules with direction related declarations (3)', t => run( t,
'a { text-align: left } ' +
'a { text-align: center }',
'[dir="ltr"] a { text-align: left } ' +
'[dir="rtl"] a { text-align: right } ' +
'[dir=ltr] a { text-align: left } ' +
'[dir=rtl] a { text-align: right } ' +
'[dir] a { text-align: center }'
) )

test( 'Should add [dir] prefix to symmetric rules with direction related declarations (4)', t => run( t,
'a { margin: 0 10px 0 0 } ' +
'a { margin-top: 20px }',
'[dir="ltr"] a { margin: 0 10px 0 0 } ' +
'[dir="rtl"] a { margin: 0 0 0 10px } ' +
'[dir=ltr] a { margin: 0 10px 0 0 } ' +
'[dir=rtl] a { margin: 0 0 0 10px } ' +
'[dir] a { margin-top: 20px }'
) )

test( 'Creates both LTR & RTL rules for asymmetric declarations', t => run( t,
'a { text-align: left }',
'[dir="ltr"] a { text-align: left } ' +
'[dir="rtl"] a { text-align: right }'
'[dir=ltr] a { text-align: left } ' +
'[dir=rtl] a { text-align: right }'
) )

test( 'Removes original rule without symmetric declarations', t => run( t,
'a { text-align: left }',
'[dir="ltr"] a { text-align: left } ' +
'[dir="rtl"] a { text-align: right }'
'[dir=ltr] a { text-align: left } ' +
'[dir=rtl] a { text-align: right }'
) )

test( 'Use custom `addPrefixToSelector` function', t => run( t,
'a { text-align: left }',
'[dir="ltr"] > a { text-align: left } ' +
'[dir="rtl"] > a { text-align: right }',
'[dir=ltr] > a { text-align: left } ' +
'[dir=rtl] > a { text-align: right }',
{
addPrefixToSelector ( selector, prefix ) {
return `${prefix} > ${selector}`
Expand Down

0 comments on commit 9926ba1

Please sign in to comment.