You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/lib/rules/link-missing-labelling.test.ts
+40-39Lines changed: 40 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -14,43 +14,44 @@ function generateTestCases(componentName: string, imageName: string) {
14
14
return{
15
15
valid: [
16
16
// Valid cases
17
-
`<${componentName} href="https://www.bing.com">This is a link</${componentName}>`,
18
-
`<${componentName} href="https://www.bing.com">This is a link<${imageName} src="img_girl.jpg" alt="" /></${componentName}>`,
19
-
`<${componentName} href="https://www.bing.com">This is a link<${imageName} src="img_girl.jpg" alt="" aria-hidden="true" /></${componentName}>`,
20
-
`<${componentName} href="https://www.bing.com"><${imageName} src="img_girl.jpg" alt="The girl with the dog." /></${componentName}>`,
21
-
`<${componentName} href="https://www.bing.com"><${imageName} src="img_girl.jpg" aria-label="The girl with the dog." /></${componentName}>`,
22
-
`<${componentName} href="https://www.bing.com" aria-label="The girl with the dog."><${imageName} src="img_girl.jpg" /></${componentName}>`,
23
-
`<${componentName} href="https://www.bing.com" title="The girl with the dog."><${imageName} src="img_girl.jpg" /></${componentName}>`,
24
-
`<><Label id="my-label-2">This is a Header</Label><${componentName} href="https://www.bing.com" aria-labelledby="my-label-2"><${imageName} src="img_girl.jpg" /></${componentName}></>`,
25
-
`<${componentName} href="https://www.bing.com"><${imageName} src="img1.jpg" /><${imageName} src="img2.jpg" alt="The girl with the dog." /></${componentName}>`
17
+
// `<${componentName} href="https://www.bing.com">This is a link</${componentName}>`,
18
+
// `<${componentName} href="https://www.bing.com">This is a link<${imageName} src="img_girl.jpg" alt="" /></${componentName}>`,
19
+
// `<${componentName} href="https://www.bing.com">This is a link<${imageName} src="img_girl.jpg" alt="" aria-hidden="true" /></${componentName}>`,
20
+
// `<${componentName} href="https://www.bing.com"><${imageName} src="img_girl.jpg" alt="The girl with the dog." /></${componentName}>`,
21
+
`<${componentName} href="https://www.bing.com"><${imageName} src="img_girl.jpg" aria-label="The girl with the dog." /></${componentName}>`
22
+
// `<${componentName} href="https://www.bing.com" aria-label="The girl with the dog."><${imageName} src="img_girl.jpg" /></${componentName}>`
23
+
// `<${componentName} href="https://www.bing.com" title="The girl with the dog."><${imageName} src="img_girl.jpg" /></${componentName}>`,
24
+
// `<><Label id="my-label-2">This is a Header</Label><${componentName} href="https://www.bing.com" aria-labelledby="my-label-2"><${imageName} src="img_girl.jpg" /></${componentName}></>`,
25
+
// `<${componentName} href="https://www.bing.com"><${imageName} src="img1.jpg" /><${imageName} src="img2.jpg" alt="The girl with the dog." /></${componentName}>`
0 commit comments