From d05a2cfaaa4eb2293a416ac1993e4eee13226894 Mon Sep 17 00:00:00 2001 From: Carlux Date: Sun, 19 Sep 2021 17:18:52 +0300 Subject: [PATCH] chore: add more test cases --- tests/lib/rules/jsx-max-props-per-line.js | 56 +++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/tests/lib/rules/jsx-max-props-per-line.js b/tests/lib/rules/jsx-max-props-per-line.js index ffd130fdbb..7002988721 100644 --- a/tests/lib/rules/jsx-max-props-per-line.js +++ b/tests/lib/rules/jsx-max-props-per-line.js @@ -76,6 +76,20 @@ ruleTester.run('jsx-max-props-per-line', rule, { '/>' ].join('\n'), options: [{maximum: {multi: 2, single: 1}}] + }, { + code: '', + options: [{maximum: {multi: 2, single: 3}}] + }, { + code: '', + options: [{maximum: {single: 2}}] + }, { + code: [ + '' + ].join('\n'), + options: [{maximum: {multi: 2, single: 1}}] } ], @@ -365,5 +379,47 @@ ruleTester.run('jsx-max-props-per-line', rule, { messageId: 'newLine', data: {prop: 'bor'} }] + }, { + code: [ + '' + ].join('\n'), + output: [ + '' + ].join('\n'), + options: [{maximum: {multi: 2}}], + errors: [{ + messageId: 'newLine', + data: {prop: 'baz'} + }] + }, { + code: [ + '' + ].join('\n'), + output: [ + '' + ].join('\n'), + options: [{maximum: {multi: 2, single: 1}}], + errors: [{ + messageId: 'newLine', + data: {prop: 'fuz'} + }, { + messageId: 'newLine', + data: {prop: 'baz'} + }] }] });