Skip to content

Commit

Permalink
adds tests to validate issue is resolved.
Browse files Browse the repository at this point in the history
  • Loading branch information
TaLeaMonet committed Sep 18, 2020
1 parent 2588c4d commit 5fbc847
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/lib/rules/jsx-one-expression-per-line.js
Expand Up @@ -1029,5 +1029,28 @@ ruleTester.run('jsx-one-expression-per-line', rule, {
errors: [{message: '`Foo` must be placed on a new line'}],
parser: parsers.BABEL_ESLINT,
parserOptions
}, {
code: [
'<div>',
'<MyComponent>a</MyComponent>',
'<MyOther>{a}</MyOther>',
'</div>'
].join('\n'),
output: [
'<div>',
'<MyComponent>',
'a',
'</MyComponent>',
'<MyOther>',
'{a}',
'</MyOther>',
'</div>'
].join('\n'),
errors: [
{message: '`a` must be placed on a new line'},
{message: '`{a}` must be placed on a new line'}
],
parser: parsers.BABEL_ESLINT,
parserOptions
}]
});

0 comments on commit 5fbc847

Please sign in to comment.