Skip to content

Commit

Permalink
Add more mixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fatfisz committed Jun 11, 2017
1 parent 408e1b1 commit 5515130
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions tests/lib/rules/jsx-curly-spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,43 @@ ruleTester.run('jsx-curly-spacing', rule, {
}, {
code: '<App foo={ bar }>{bar}</App>',
options: [{attributes: {when: 'always'}}]
}, {
code: '<App foo={ bar }>{bar}</App>',
options: [{attributes: {when: 'always'}}]
}, {
code: [
'<App foo={ 42 } { ...bar } baz={{ 4: 2 }}>',
'{foo} {{ bar: baz }}',
'</App>'
].join('\n'),
options: [{
when: 'never',
attributes: {when: 'always', spacing: {objectLiterals: 'never'}},
children: true
}]
}, {
code: [
'<App foo={42} {...bar} baz={ { 4: 2 } }>',
'{foo} { { bar: baz } }',
'</App>'
].join('\n'),
options: [{
when: 'never',
spacing: {objectLiterals: 'always'},
attributes: true,
children: {when: 'never'}
}]
}, {
code: [
'<App foo={42} {...bar} baz={ { 4: 2 } }>',
'{foo} { { bar: baz } }',
'</App>'
].join('\n'),
options: [{
spacing: {objectLiterals: 'always'},
attributes: {when: 'never', spacing: {objectLiterals: 'always'}},
children: {when: 'never'}
}]
}],

invalid: [{
Expand Down

0 comments on commit 5515130

Please sign in to comment.