Skip to content

Commit 262d21e

Browse files
committed
test: add tests for custom label elements
1 parent 880f5f5 commit 262d21e

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-vuejs-accessibility",
3-
"version": "1.2.0",
3+
"version": "1.1.0",
44
"description": "An eslint plugin for checking Vue.js files for accessibility",
55
"main": "dist/index.js",
66
"scripts": {

Diff for: src/rules/__tests__/form-control-has-label.test.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,15 @@ makeRuleTester("form-control-has-label", rule, {
2121
<div aria-hidden="true">
2222
<input value="1" type="text" />
2323
</div>
24-
`
24+
`,
25+
{
26+
code: "<custom-label for='input'>text</custom-label><input type='text' id='input' />",
27+
options: [{ labelComponents: ["CustomLabel"] }]
28+
},
2529
],
26-
invalid: ["<input type='text' />", "<textarea type='text'></textarea>"]
30+
invalid: [
31+
"<input type='text' />",
32+
"<textarea type='text'></textarea>",
33+
"<custom-label for='input'>text</custom-label><input type='text' id='input' />"
34+
]
2735
});

0 commit comments

Comments
 (0)