diff --git a/tests/lib/rules/jsx-curly-spacing.js b/tests/lib/rules/jsx-curly-spacing.js
index 17fbcf1e94..593aeab3c0 100644
--- a/tests/lib/rules/jsx-curly-spacing.js
+++ b/tests/lib/rules/jsx-curly-spacing.js
@@ -2118,5 +2118,81 @@ ruleTester.run('jsx-curly-spacing', rule, {
}, {
message: 'A space is required before \'}\''
}]
+ }, {
+ code: [
+ '',
+ '{ /* comment */ }',
+ ';'
+ ].join('\n'),
+ output: [
+ '',
+ '{/* comment */}',
+ ';'
+ ].join('\n'),
+ options: [{when: 'never', children: true}],
+ errors: [{
+ message: 'There should be no space after \'{\''
+ }, {
+ message: 'There should be no space before \'}\''
+ }]
+ }, {
+ code: [
+ '',
+ '{/* comment */}',
+ ';'
+ ].join('\n'),
+ output: [
+ '',
+ '{ /* comment */ }',
+ ';'
+ ].join('\n'),
+ options: [{when: 'always', children: true}],
+ errors: [{
+ message: 'A space is required after \'{\''
+ }, {
+ message: 'A space is required before \'}\''
+ }]
+ }, {
+ code: [
+ '{ /* comment */',
+ 'bar',
+ '} {',
+ 'baz',
+ '/* comment */ };'
+ ].join('\n'),
+ output: [
+ '{/* comment */',
+ 'bar',
+ '} {',
+ 'baz',
+ '/* comment */};'
+ ].join('\n'),
+ options: [{when: 'never', children: true}],
+ errors: [{
+ message: 'There should be no space after \'{\''
+ }, {
+ message: 'There should be no space before \'}\''
+ }]
+ }, {
+ code: [
+ '{/* comment */',
+ 'bar',
+ '} {',
+ 'baz',
+ '/* comment */};'
+ ].join('\n'),
+ output: [
+ '{ /* comment */',
+ 'bar',
+ '} {',
+ 'baz',
+ '/* comment */ };'
+ ].join('\n'),
+ options: [{when: 'always', children: true}],
+ errors: [{
+ message: 'A space is required after \'{\''
+ }, {
+ message: 'A space is required before \'}\''
+ }]
}]
});