Skip to content

Commit efaa4d0

Browse files
committed
Adding test cases for label tests
1 parent 1614b85 commit efaa4d0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

__tests__/src/rules/control-has-associated-label-test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ const alwaysValid = [
210210
{ code: '<input type="datetime" />' },
211211
{ code: '<input type="email" />' },
212212
{ code: '<input type="file" />' },
213+
{ code: '<input type="hidden" />' },
214+
{ code: '<input type="hidden" name="bot-field"/>' },
215+
{ code: '<input type="hidden" name="form-name" value="Contact Form"/>' },
213216
{ code: '<input type="image" />' },
214217
{ code: '<input type="month" />' },
215218
{ code: '<input type="number" />' },

__tests__/src/rules/label-has-associated-control-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const bothValid = [
7070
const alwaysValid = [
7171
{ code: '<div />' },
7272
{ code: '<CustomElement />' },
73+
{ code: '<input type="hidden" />' },
7374
];
7475

7576
const htmlForInvalid = [

0 commit comments

Comments
 (0)