From ab23105345d9436658abf61368c314acbec3192f Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 25 Mar 2021 23:38:47 -0700 Subject: [PATCH] [Tests] add failing test for https://github.com/AriPerkkio/eslint-remote-tester/issues/29#issuecomment-806811449 --- tests/lib/rules/jsx-max-depth.js | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/lib/rules/jsx-max-depth.js b/tests/lib/rules/jsx-max-depth.js index 14bc69b99a..6452c0c630 100644 --- a/tests/lib/rules/jsx-max-depth.js +++ b/tests/lib/rules/jsx-max-depth.js @@ -114,6 +114,39 @@ ruleTester.run('jsx-max-depth', rule, { ' return
{A}
;', '}' ].join('\n') + }, { + code: [ + 'class WarnModal extends Component {', + ' render() {', + ' const { cancelMsg, acceptMsg, isOpen, onAccept, classes, children } = this.props;', + ' let { onClose, onCancel } = this.props;', + ' if (!onClose) onClose = onCancel;', + ' if (!onCancel) onCancel = onClose;', + '', + ' return (', + '
', + ' ', + ' ', + ' ', + ' ', + '
{children}
', + '
', + ' ', + ' ', + '
', + '
', + '
', + '
', + '
', + ' );', + ' }', + '}' + ].join('\n'), + options: [{max: 5}] }], invalid: [{