Skip to content

Commit 0d2bc43

Browse files
V2dhaljharb
authored andcommittedJul 15, 2022
[Tests] no-noninteractive-element-interactions: add passing test cases
Close #474
1 parent a962211 commit 0d2bc43

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
 

‎__tests__/src/rules/no-noninteractive-element-interactions-test.js

+13
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,19 @@ const alwaysValid = [
139139
},
140140
{ code: '<img {...props} onError={() => {}} />;' },
141141
{ code: '<img onLoad={() => {}} />;' },
142+
{ code: '<img src={currentPhoto.imageUrl} onLoad={this.handleImageLoad} alt="for review" />' },
143+
{
144+
code: `
145+
<img
146+
ref={this.ref}
147+
className="c-responsive-image-placeholder__image"
148+
src={src}
149+
alt={alt}
150+
data-test-id="test-id"
151+
onLoad={this.fetchCompleteImage}
152+
/>
153+
`,
154+
},
142155
{ code: '<ins onClick={() => {}} />;' },
143156
{ code: '<kbd onClick={() => {}} />;' },
144157
{ code: '<keygen onClick={() => {}} />;' },

0 commit comments

Comments
 (0)