diff --git a/tests/lib/rules/jsx-indent.js b/tests/lib/rules/jsx-indent.js
index d2f7892f96..6eba8d83ae 100644
--- a/tests/lib/rules/jsx-indent.js
+++ b/tests/lib/rules/jsx-indent.js
@@ -99,6 +99,16 @@ ruleTester.run('jsx-indent', rule, {
].join('\n'),
options: [2],
parserOptions: parserOptions
+ }, {
+ code: [
+ 'function App() {',
+ ' return (',
+ ' ',
+ ' );',
+ '}'
+ ].join('\n'),
+ options: [2],
+ parserOptions: parserOptions
}],
invalid: [{
@@ -162,5 +172,27 @@ ruleTester.run('jsx-indent', rule, {
options: [2],
parserOptions: parserOptions,
errors: [{message: 'Expected indentation of 4 space characters but found 0.'}]
+ }, {
+ code: [
+ 'function App() {',
+ ' return (',
+ ' ',
+ ' );',
+ '}'
+ ].join('\n'),
+ options: [2],
+ parserOptions: parserOptions,
+ errors: [{message: 'Expected indentation of 2 space characters but found 4.'}]
+ }, {
+ code: [
+ 'function App() {',
+ ' return (',
+ ' ',
+ ');',
+ '}'
+ ].join('\n'),
+ options: [2],
+ parserOptions: parserOptions,
+ errors: [{message: 'Expected indentation of 2 space characters but found 0.'}]
}]
});