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: [{