diff --git a/tests/lib/rules/jsx-indent.js b/tests/lib/rules/jsx-indent.js index 43d6a80a70..bb5429cab6 100644 --- a/tests/lib/rules/jsx-indent.js +++ b/tests/lib/rules/jsx-indent.js @@ -832,6 +832,19 @@ const Component = () => ( } `, options: [2, {checkAttributes: true}] + }, { + code: ` + function Foo() { + return ( +
+ {condition && ( +

Bar

+ )} +
+ ); + } + `, + options: [2, {indentLogicalExpressions: true}] }], invalid: [{ @@ -1652,5 +1665,32 @@ const Component = () => ( errors: [ {message: 'Expected indentation of 2 tab characters but found 0.'} ] + }, { + code: ` + function Foo() { + return ( +
+ {condition && ( +

Bar

+ )} +
+ ); + } + `, + output: ` + function Foo() { + return ( +
+ {condition && ( +

Bar

+ )} +
+ ); + } + `, + options: [2, {indentLogicalExpressions: true}], + errors: [ + {message: 'Expected indentation of 12 space characters but found 10.'} + ] }] });