Skip to content

Commit bedb1ea

Browse files
committed
feat: add tests for role none
1 parent 612247f commit bedb1ea

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

__tests__/src/elementRoleMap-test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ const entriesList = [
8787
[{"name": "option"}, ["option"]],
8888
[{"name": "p"}, ["paragraph"]],
8989
[{"attributes": [{"name": "alt", "value": ""}], "name": "img"}, ["presentation"]],
90+
[{"attributes": [{"name": "alt", "value": ""}], "name": "img"}, ["none"]],
9091
[{"name": "progress"}, ["progressbar"]],
9192
[{"attributes": [{"name": "aria-valuemax"}, {"name": "aria-valuemin", "value": 0}, {"name": "aria-valuenow"}], "constraints": ["the progress bar is determinate"],"name": "progress"}, ["progressbar"]],
9293
[{"attributes": [{"name": "type", "value": "radio"}], "name": "input"}, ["radio"]],
@@ -230,7 +231,7 @@ describe('elementRolesMap', function () {
230231
});
231232
describe('spread operator', function () {
232233
it('should have a specific length', function () {
233-
expect([...elementRoleMap].length).toEqual(113);
234+
expect([...elementRoleMap].length).toEqual(114);
234235
});
235236
test.each([...elementRoleMap])('Testing element: %o', (obj, roles) => {
236237
expect(entriesList).toEqual(

__tests__/src/roleElementMap-test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const entriesList = [
4040
["option", [{"name": "option"}]],
4141
["paragraph", [{"name": "p"}]],
4242
["presentation", [{"attributes": [{"name": "alt", "value": ""}], "name": "img"}]],
43+
["none", [{"attributes": [{"name": "alt", "value": ""}], "name": "img"}]],
4344
["progressbar", [{"name": "progress"}]],
4445
["radio", [{"attributes": [{"name": "type", "value": "radio"}], "name": "input"}]],
4546
["region", [{"attributes": [{"constraints": ["set"], "name": "aria-label"}], "name": "section"}, {"attributes": [{"constraints": ["set"], "name": "aria-labelledby"}], "name": "section"}]],
@@ -146,7 +147,7 @@ describe('roleElementMap', function () {
146147
});
147148
describe('spread operator', function () {
148149
it('should have a specific length', function () {
149-
expect([...roleElementMap].length).toEqual(55);
150+
expect([...roleElementMap].length).toEqual(56);
150151
});
151152
test.each([...roleElementMap])('Testing element: %o', (obj, roles) => {
152153
expect(entriesList).toEqual(

0 commit comments

Comments
 (0)