Skip to content

Commit

Permalink
[Tests] no-noninteractive-element-interactions: add passing test cases
Browse files Browse the repository at this point in the history
Close #474
  • Loading branch information
V2dha authored and ljharb committed Jul 15, 2022
1 parent a962211 commit 0d2bc43
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions __tests__/src/rules/no-noninteractive-element-interactions-test.js
Expand Up @@ -139,6 +139,19 @@ const alwaysValid = [
},
{ code: '<img {...props} onError={() => {}} />;' },
{ code: '<img onLoad={() => {}} />;' },
{ code: '<img src={currentPhoto.imageUrl} onLoad={this.handleImageLoad} alt="for review" />' },
{
code: `
<img
ref={this.ref}
className="c-responsive-image-placeholder__image"
src={src}
alt={alt}
data-test-id="test-id"
onLoad={this.fetchCompleteImage}
/>
`,
},
{ code: '<ins onClick={() => {}} />;' },
{ code: '<kbd onClick={() => {}} />;' },
{ code: '<keygen onClick={() => {}} />;' },
Expand Down

0 comments on commit 0d2bc43

Please sign in to comment.