Skip to content

Commit

Permalink
[Tests] add jsx-curly-spacing test case.
Browse files Browse the repository at this point in the history
Closes #1763
  • Loading branch information
ljharb committed Apr 10, 2018
1 parent 45fb147 commit 512b410
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/lib/rules/jsx-curly-spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -2256,5 +2256,18 @@ ruleTester.run('jsx-curly-spacing', rule, {
}, {
message: 'A space is required before \'}\''
}]
}, {
code: [
'<div className={ this.state.renderInfo ? "infoPanel col-xs-12" : "unToggled col-xs-12" } />'
].join('\n'),
output: [
'<div className={this.state.renderInfo ? "infoPanel col-xs-12" : "unToggled col-xs-12"} />'
].join('\n'),
options: ["never", {"allowMultiline": true}],
errors: [{
message: 'There should be no space after \'{\''
}, {
message: 'There should be no space before \'}\''
}]
}]
});

0 comments on commit 512b410

Please sign in to comment.