Skip to content

Commit

Permalink
[Tests] jsx-wrap-multilines: passing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
burtek authored and ljharb committed Jan 10, 2024
1 parent 2e30897 commit 5a7fe04
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
* [Refactor] [`function-component-definition`]: exit early if no type params ([#3634][] @HenryBrown0)
* [Refactor] [`jsx-props-no-multi-spaces`]: extract type parameters to var ([#3634][] @HenryBrown0)
* [Docs] [`jsx-key`]: fix correct example ([#3656][] @developer-bandi)
* [Tests] `jsx-wrap-multilines`: passing tests ([#3545][] @burtek)

[#3674]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3674
[#3668]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3668
Expand All @@ -42,6 +43,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
[#3630]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3630
[#3623]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3623
[#3615]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3615
[#3545]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3545

## [7.33.2] - 2023.08.15

Expand Down
40 changes: 40 additions & 0 deletions tests/lib/rules/jsx-wrap-multilines.js
Original file line number Diff line number Diff line change
Expand Up @@ -1611,5 +1611,45 @@ ruleTester.run('jsx-wrap-multilines', rule, {
options: [{ declaration: 'parens-new-line' }],
errors: [{ messageId: 'missingParens' }],
},
{
code: `
export default () => <h1>
<span>
hello
</span>
</h1>;
`,
output: `
export default () => (
<h1>
<span>
hello
</span>
</h1>
);
`,
options: [{ arrow: 'parens-new-line' }],
errors: [{ messageId: 'missingParens' }],
},
{
code: `
export default () => (<h1>
<span>
hello
</span>
</h1>);
`,
output: `
export default () => (
<h1>
<span>
hello
</span>
</h1>
);
`,
options: [{ arrow: 'parens-new-line' }],
errors: [{ messageId: 'parensOnNewLines' }],
},
]),
});

0 comments on commit 5a7fe04

Please sign in to comment.