Skip to content

Commit

Permalink
[Tests] number comments to more easily locate failures
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 20, 2017
1 parent b4141d8 commit a2764d9
Showing 1 changed file with 51 additions and 51 deletions.
102 changes: 51 additions & 51 deletions tests/lib/rules/jsx-curly-spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ ruleTester.run('jsx-curly-spacing', rule, {
'</App>;'
].join('\n')
}, {
code: '<App>{ foo /* comment */ }</App>'
code: '<App>{ foo /* comment 1 */ }</App>'
}, {
code: '<App>{ /* comment */ foo }</App>'
code: '<App>{ /* comment 1 */ foo }</App>'
}, {
code: '<App foo={bar} />;',
options: [{attributes: true}]
Expand Down Expand Up @@ -264,7 +264,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
].join('\n'),
options: [{attributes: {when: 'never', allowMultiline: true}}]
}, {
code: '<App foo={bar/* comment */} />;',
code: '<App foo={bar/* comment 2 */} />;',
options: [{attributes: {when: 'never'}}]
}, {
code: '<App foo={ bar } />;',
Expand Down Expand Up @@ -345,11 +345,11 @@ ruleTester.run('jsx-curly-spacing', rule, {
options: [{children: {when: 'never', allowMultiline: true}}]
}, {
code: [
'<App>{/* comment */}</App>;'
'<App>{/* comment 3 */}</App>;'
].join('\n'),
options: [{children: {when: 'never'}}]
}, {
code: '<App>{bar/* comment */}</App>;',
code: '<App>{bar/* comment 4 */}</App>;',
options: [{children: {when: 'never'}}]
}, {
code: '<App>{ bar }</App>;',
Expand Down Expand Up @@ -411,7 +411,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
].join('\n'),
options: [{attributes: {when: 'never', allowMultiline: true}}]
}, {
code: '<App {...bar/* comment */} />;',
code: '<App {...bar/* comment 5 */} />;',
options: [{attributes: {when: 'never'}}]
}, {
code: '<App foo={bar} {...baz} />;'
Expand Down Expand Up @@ -440,13 +440,13 @@ ruleTester.run('jsx-curly-spacing', rule, {
].join('\n'),
options: [{attributes: {when: 'always'}}]
}, {
code: '<App foo={bar/* comment */} {...baz/* comment */} />;',
code: '<App foo={bar/* comment 6 */} {...baz/* comment 7 */} />;',
options: [{attributes: {when: 'never'}}]
}, {
code: '<App foo={3} bar={ {a: 2} } />',
options: [{attributes: {when: 'never', spacing: {objectLiterals: 'always'}}}]
}, {
code: '<App>{bar/* comment */}</App>;',
code: '<App>{bar/* comment 8 */}</App>;',
options: [{children: {when: 'never'}}]
}, {
code: '<App>{bar} {baz}</App>;'
Expand Down Expand Up @@ -475,7 +475,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
].join('\n'),
options: [{children: {when: 'always'}}]
}, {
code: '<App>{bar/* comment */} {baz/* comment */}</App>;',
code: '<App>{bar/* comment 9 */} {baz/* comment 10 */}</App>;',
options: [{children: {when: 'never'}}]
}, {
code: '<App>{3} { {a: 2} }</App>',
Expand Down Expand Up @@ -572,11 +572,11 @@ ruleTester.run('jsx-curly-spacing', rule, {
options: ['never']
}, {
code: [
'<App>{/* comment */}</App>;'
'<App>{/* comment 11 */}</App>;'
].join('\n'),
options: ['never']
}, {
code: '<App foo={bar/* comment */} />;',
code: '<App foo={bar/* comment 12 */} />;',
options: ['never']
}, {
code: '<App foo={ bar } />;',
Expand Down Expand Up @@ -636,7 +636,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
].join('\n'),
options: ['never']
}, {
code: '<App {...bar/* comment */} />;',
code: '<App {...bar/* comment 13 */} />;',
options: ['never']
}, {
code: '<App foo={bar} {...baz} />;',
Expand All @@ -663,7 +663,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
].join('\n'),
options: ['always']
}, {
code: '<App foo={bar/* comment */} {...baz/* comment */} />;',
code: '<App foo={bar/* comment 14 */} {...baz/* comment 15 */} />;',
options: ['never']
}, {
code: '<App foo={3} bar={ {a: 2} } />',
Expand Down Expand Up @@ -1514,33 +1514,33 @@ ruleTester.run('jsx-curly-spacing', rule, {
message: 'A space is required before \'}\''
}]
}, {
code: '<App foo={ foo /* comment */ } />',
output: '<App foo={foo /* comment */} />',
code: '<App foo={ foo /* comment 16 */ } />',
output: '<App foo={foo /* comment 16 */} />',
errors: [{
message: 'There should be no space after \'{\''
}, {
message: 'There should be no space before \'}\''
}]
}, {
code: '<App foo={foo /* comment */} />',
output: '<App foo={ foo /* comment */ } />',
code: '<App foo={foo /* comment 17 */} />',
output: '<App foo={ foo /* comment 17 */ } />',
options: [{attributes: {when: 'always'}}],
errors: [{
message: 'A space is required after \'{\''
}, {
message: 'A space is required before \'}\''
}]
}, {
code: '<App foo={ /* comment */ foo } />',
output: '<App foo={/* comment */ foo} />',
code: '<App foo={ /* comment 18 */ foo } />',
output: '<App foo={/* comment 18 */ foo} />',
errors: [{
message: 'There should be no space after \'{\''
}, {
message: 'There should be no space before \'}\''
}]
}, {
code: '<App foo={/* comment */ foo} />',
output: '<App foo={ /* comment */ foo } />',
code: '<App foo={/* comment 19 */ foo} />',
output: '<App foo={ /* comment 19 */ foo } />',
options: [{attributes: {when: 'always'}}],
errors: [{
message: 'A space is required after \'{\''
Expand Down Expand Up @@ -1687,17 +1687,17 @@ ruleTester.run('jsx-curly-spacing', rule, {
message: 'A space is required before \'}\''
}]
}, {
code: '<App>{foo /* comment */}</App>',
output: '<App>{ foo /* comment */ }</App>',
code: '<App>{foo /* comment 20 */}</App>',
output: '<App>{ foo /* comment 20 */ }</App>',
options: [{children: {when: 'always'}}],
errors: [{
message: 'A space is required after \'{\''
}, {
message: 'A space is required before \'}\''
}]
}, {
code: '<App>{/* comment */ foo}</App>',
output: '<App>{ /* comment */ foo }</App>',
code: '<App>{/* comment 21 */ foo}</App>',
output: '<App>{ /* comment 21 */ foo }</App>',
options: [{children: {when: 'always'}}],
errors: [{
message: 'A space is required after \'{\''
Expand Down Expand Up @@ -2108,40 +2108,40 @@ ruleTester.run('jsx-curly-spacing', rule, {
message: 'A space is required before \'}\''
}]
}, {
code: '<App foo={foo /* comment */} />',
output: '<App foo={ foo /* comment */ } />',
code: '<App foo={foo /* comment 22 */} />',
output: '<App foo={ foo /* comment 22 */ } />',
options: ['always'],
errors: [{
message: 'A space is required after \'{\''
}, {
message: 'A space is required before \'}\''
}]
}, {
code: '<App foo={/* comment */ foo} />',
output: '<App foo={ /* comment */ foo } />',
code: '<App foo={/* comment 23 */ foo} />',
output: '<App foo={ /* comment 23 */ foo } />',
options: ['always'],
errors: [{
message: 'A space is required after \'{\''
}, {
message: 'A space is required before \'}\''
}]
}, {
code: '<App>{/*comment*/ }</App>',
output: '<App>{/*comment*/}</App>',
code: '<App>{/*comment24*/ }</App>',
output: '<App>{/*comment24*/}</App>',
options: [{children: {when: 'never'}}],
errors: [{
message: 'There should be no space before \'}\''
}]
}, {
code: '<App>{ /*comment*/}</App>',
output: '<App>{/*comment*/}</App>',
code: '<App>{ /*comment25*/}</App>',
output: '<App>{/*comment25*/}</App>',
options: [{children: {when: 'never'}}],
errors: [{
message: 'There should be no space after \'{\''
}]
}, {
code: '<App>{/*comment*/}</App>',
output: '<App>{ /*comment*/ }</App>',
code: '<App>{/*comment26*/}</App>',
output: '<App>{ /*comment26*/ }</App>',
options: [{children: {when: 'always'}}],
errors: [{
message: 'A space is required after \'{\''
Expand All @@ -2151,12 +2151,12 @@ ruleTester.run('jsx-curly-spacing', rule, {
}, {
code: [
'<App>',
'{ /* comment */ }',
'{ /* comment 27 */ }',
'</App>;'
].join('\n'),
output: [
'<App>',
'{/* comment */}',
'{/* comment 27 */}',
'</App>;'
].join('\n'),
options: [{when: 'never', children: true}],
Expand All @@ -2168,12 +2168,12 @@ ruleTester.run('jsx-curly-spacing', rule, {
}, {
code: [
'<App>',
'{/* comment */}',
'{/* comment 28 */}',
'</App>;'
].join('\n'),
output: [
'<App>',
'{ /* comment */ }',
'{ /* comment 28 */ }',
'</App>;'
].join('\n'),
options: [{when: 'always', children: true}],
Expand All @@ -2185,13 +2185,13 @@ ruleTester.run('jsx-curly-spacing', rule, {
}, {
code: [
'<App>',
'{/*comment*/',
'{/*comment29*/',
'}',
'</App>'
].join('\n'),
output: [
'<App>',
'{/*comment*/}',
'{/*comment29*/}',
'</App>'
].join('\n'),
options: [{children: {when: 'never', allowMultiline: false}}],
Expand All @@ -2202,12 +2202,12 @@ ruleTester.run('jsx-curly-spacing', rule, {
code: [
'<App>',
'{',
'/*comment*/}',
'/*comment30*/}',
'</App>'
].join('\n'),
output: [
'<App>',
'{/*comment*/}',
'{/*comment30*/}',
'</App>'
].join('\n'),
options: [{children: {when: 'never', allowMultiline: false}}],
Expand All @@ -2216,18 +2216,18 @@ ruleTester.run('jsx-curly-spacing', rule, {
}]
}, {
code: [
'<App>{ /* comment */',
'<App>{ /* comment 31 */',
'bar',
'} {',
'baz',
'/* comment */ }</App>;'
'/* comment 32 */ }</App>;'
].join('\n'),
output: [
'<App>{/* comment */',
'<App>{/* comment 31 */',
'bar',
'} {',
'baz',
'/* comment */}</App>;'
'/* comment 32 */}</App>;'
].join('\n'),
options: [{when: 'never', children: true}],
errors: [{
Expand All @@ -2237,18 +2237,18 @@ ruleTester.run('jsx-curly-spacing', rule, {
}]
}, {
code: [
'<App>{/* comment */',
'<App>{/* comment 33 */',
'bar',
'} {',
'baz',
'/* comment */}</App>;'
'/* comment 33 */}</App>;'
].join('\n'),
output: [
'<App>{ /* comment */',
'<App>{ /* comment 33 */',
'bar',
'} {',
'baz',
'/* comment */ }</App>;'
'/* comment 33 */ }</App>;'
].join('\n'),
options: [{when: 'always', children: true}],
errors: [{
Expand Down

0 comments on commit a2764d9

Please sign in to comment.