Skip to content

Commit

Permalink
test: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jaesoekjjang committed Feb 1, 2024
1 parent 246bf49 commit 7c2fb74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/lib/rules/checked-requires-onchange-or-readonly.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ ruleTester.run('checked-requires-onchange-or-readonly', rule, {
'<input type="checkbox" checked onChange={noop} />',
'<input type="checkbox" checked readOnly />',
'<input type="checkbox" defaultChecked />',
'<span/>',
"React.createElement('input', { checked: true, onChange: noop })",
"React.createElement('input', { checked: false, onChange: noop })",
"React.createElement('input', { checked: true, readOnly: true })",
"React.createElement('input', { checked: true, onChange: noop, readOnly: true })",
"React.createElement('span')",
{
code: '<input type="checkbox" checked />',
options: [{ ignoreMissingProperties: false }],
Expand All @@ -40,7 +42,6 @@ ruleTester.run('checked-requires-onchange-or-readonly', rule, {
code: '<input type="checkbox" onChange={noop} checked defaultChecked />',
options: [{ ignoreExclusiveCheckedAttribute: false }],
},
'<span/>',
]),
invalid: parsers.all([
{
Expand Down

0 comments on commit 7c2fb74

Please sign in to comment.