Skip to content

Commit 4a076f7

Browse files
authored
Add tests for JSX fragments
1 parent 94e2467 commit 4a076f7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/lib/rules/jsx-curly-brace-presence.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -932,13 +932,27 @@ ruleTester.run('jsx-curly-brace-presence', rule, {
932932
output: `<App horror={<div />} />`,
933933
errors: [{ messageId: 'missingCurly' }],
934934
},
935+
{
936+
code: `<App horror=<><div /></> />`,
937+
options: [{ props: 'always', children: 'always', propElementValues: 'always' }],
938+
features: ['no-ts'],
939+
output: `<App horror={<><div /></>} />`,
940+
errors: [{ messageId: 'missingCurly' }],
941+
},
935942
{
936943
code: `<App horror={<div />} />`,
937944
options: [{ props: 'never', children: 'never', propElementValues: 'never' }],
938945
features: ['no-ts'],
939946
output: `<App horror=<div /> />`,
940947
errors: [{ messageId: 'unnecessaryCurly' }],
941948
},
949+
{
950+
code: `<App horror={<><div /></>} />`,
951+
options: [{ props: 'never', children: 'never', propElementValues: 'never' }],
952+
features: ['no-ts'],
953+
output: `<App horror=<><div /></> />`,
954+
errors: [{ messageId: 'unnecessaryCurly' }],
955+
},
942956
{
943957
code: `<Foo bar={"'"} />`,
944958
options: [{ props: 'never', children: 'never', propElementValues: 'never' }],

0 commit comments

Comments
 (0)