Skip to content

Commit

Permalink
Add failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Joachim Seminck committed May 23, 2017
1 parent f0dcaca commit b66268b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/lib/rules/jsx-sort-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ var expectedInvalidReservedFirstError = {
var callbacksLastArgs = [{
callbacksLast: true
}];
var ignoreCaseAndCallbackLastArgs = [{
callbacksLast: true,
ignoreCase: true
}];
var shorthandFirstArgs = [{
shorthandFirst: true
}];
Expand Down Expand Up @@ -109,6 +113,7 @@ ruleTester.run('jsx-sort-props', rule, {
{code: '<App A b C />;', options: ignoreCaseArgs},
// Sorting callbacks below all other props
{code: '<App a z onBar onFoo />;', options: callbacksLastArgs},
{code: '<App z onBar onFoo />;', options: ignoreCaseAndCallbackLastArgs},
// Sorting shorthand props before others
{code: '<App a b="b" />;', options: shorthandFirstArgs},
{code: '<App z a="a" />;', options: shorthandFirstArgs},
Expand Down

0 comments on commit b66268b

Please sign in to comment.