Skip to content

Commit a7a3fe8

Browse files
committed
chore: add test case
1 parent 8ac873d commit a7a3fe8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/lib/rules/no-danger.js

+14
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,19 @@ ruleTester.run('no-danger', rule, {
115115
],
116116
options: [{ customComponentNames: ['Foo*'] }],
117117
},
118+
{
119+
code: `
120+
function App() {
121+
return <TextMUI dangerouslySetInnerHTML={{ __html: "<span>hello</span>" }} />;
122+
}
123+
`,
124+
options: [{ customComponentNames: ['*MUI'] }],
125+
errors: [
126+
{
127+
messageId: 'dangerousProp',
128+
data: { name: 'dangerouslySetInnerHTML' },
129+
},
130+
],
131+
},
118132
]),
119133
});

0 commit comments

Comments
 (0)