diff --git a/tests/lib/rules/jsx-indent.js b/tests/lib/rules/jsx-indent.js index 818df31a24..01dd0fa10c 100644 --- a/tests/lib/rules/jsx-indent.js +++ b/tests/lib/rules/jsx-indent.js @@ -955,6 +955,27 @@ const Component = () => ( } `, options: [2, {indentLogicalExpressions: true}] + }, { + code: [ + '', + ' text', + '' + ].join('\n') + }, { + code: [ + '', + ' text', + ' text', + ' text', + '' + ].join('\n') + }, { + code: [ + '', + '\ttext', + '' + ].join('\n'), + options: ['tab'] }], invalid: [{ @@ -1882,5 +1903,44 @@ const Component = () => ( errors: [ {message: 'Expected indentation of 8 space characters but found 4.'} ] + }, { + code: [ + '
', + 'text', + '
' + ].join('\n'), + errors: [ + {message: 'Expected indentation of 4 space characters but found 0.'} + ] + }, { + code: [ + '
', + ' text', + 'text', + '
' + ].join('\n'), + errors: [ + {message: 'Expected indentation of 4 space characters but found 2,0.'} + ] + }, { + code: [ + '
', + '\t text', + ' \t text', + '
' + ].join('\n'), + errors: [ + {message: 'Expected indentation of 4 space characters but found 0,2.'} + ] + }, { + code: [ + '
', + '\t\ttext', + '
' + ].join('\n'), + options: ['tab'], + errors: [ + {message: 'Expected indentation of 1 tab character but found 2.'} + ] }] });