Skip to content

Commit

Permalink
chore: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
akulsr0 committed May 7, 2024
1 parent 8ac873d commit a7a3fe8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/lib/rules/no-danger.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,19 @@ ruleTester.run('no-danger', rule, {
],
options: [{ customComponentNames: ['Foo*'] }],
},
{
code: `
function App() {
return <TextMUI dangerouslySetInnerHTML={{ __html: "<span>hello</span>" }} />;
}
`,
options: [{ customComponentNames: ['*MUI'] }],
errors: [
{
messageId: 'dangerousProp',
data: { name: 'dangerouslySetInnerHTML' },
},
],
},
]),
});

0 comments on commit a7a3fe8

Please sign in to comment.