diff --git a/CHANGELOG.md b/CHANGELOG.md index d3bcba1c73..6f468f9264 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 diff --git a/tests/lib/rules/jsx-wrap-multilines.js b/tests/lib/rules/jsx-wrap-multilines.js index d92cecf145..0d59679887 100644 --- a/tests/lib/rules/jsx-wrap-multilines.js +++ b/tests/lib/rules/jsx-wrap-multilines.js @@ -1611,5 +1611,45 @@ ruleTester.run('jsx-wrap-multilines', rule, { options: [{ declaration: 'parens-new-line' }], errors: [{ messageId: 'missingParens' }], }, + { + code: ` + export default () =>

+ + hello + +

; + `, + output: ` + export default () => ( +

+ + hello + +

+); + `, + options: [{ arrow: 'parens-new-line' }], + errors: [{ messageId: 'missingParens' }], + }, + { + code: ` +export default () => (

+ + hello + +

); + `, + output: ` + export default () => ( +

+ + hello + +

+); + `, + options: [{ arrow: 'parens-new-line' }], + errors: [{ messageId: 'parensOnNewLines' }], + }, ]), });