Skip to content

Commit

Permalink
Add new test cases to discuss about the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
broccolinisoup committed Apr 10, 2024
1 parent fa6376c commit 221802b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/rules/__tests__/no-deprecated-props.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,32 @@ ruleTester.run('no-deprecated-props', rule, {
},
],
},
{
code: `<ActionList.Group title={title}></ActionList.Group>`,
output: `<ActionList.Group><ActionList.GroupHeading>{title}</ActionList.GroupHeading></ActionList.Group>`,
errors: [
{
messageId: 'titlePropDeprecated',
},
],
},
{
code: `<ActionList.Group title={'Title'}></ActionList.Group>`,
output: `<ActionList.Group><ActionList.GroupHeading>Title</ActionList.GroupHeading></ActionList.Group>`,
errors: [
{
messageId: 'titlePropDeprecated',
},
],
},
{
code: `<ActionList.Group title={condition ? 'Title' : undefined}></ActionList.Group>`,
output: `<ActionList.Group><ActionList.GroupHeading>Group heading 1</ActionList.GroupHeading></ActionList.Group>`,
errors: [
{
messageId: 'titlePropDeprecated',
},
],
},
],
})

0 comments on commit 221802b

Please sign in to comment.