Skip to content

Commit

Permalink
feat: add tests for role none
Browse files Browse the repository at this point in the history
  • Loading branch information
huynhducduy committed Apr 9, 2024
1 parent 612247f commit bedb1ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion __tests__/src/elementRoleMap-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const entriesList = [
[{"name": "option"}, ["option"]],
[{"name": "p"}, ["paragraph"]],
[{"attributes": [{"name": "alt", "value": ""}], "name": "img"}, ["presentation"]],
[{"attributes": [{"name": "alt", "value": ""}], "name": "img"}, ["none"]],
[{"name": "progress"}, ["progressbar"]],
[{"attributes": [{"name": "aria-valuemax"}, {"name": "aria-valuemin", "value": 0}, {"name": "aria-valuenow"}], "constraints": ["the progress bar is determinate"],"name": "progress"}, ["progressbar"]],
[{"attributes": [{"name": "type", "value": "radio"}], "name": "input"}, ["radio"]],
Expand Down Expand Up @@ -230,7 +231,7 @@ describe('elementRolesMap', function () {
});
describe('spread operator', function () {
it('should have a specific length', function () {
expect([...elementRoleMap].length).toEqual(113);
expect([...elementRoleMap].length).toEqual(114);
});
test.each([...elementRoleMap])('Testing element: %o', (obj, roles) => {
expect(entriesList).toEqual(
Expand Down
3 changes: 2 additions & 1 deletion __tests__/src/roleElementMap-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const entriesList = [
["option", [{"name": "option"}]],
["paragraph", [{"name": "p"}]],
["presentation", [{"attributes": [{"name": "alt", "value": ""}], "name": "img"}]],
["none", [{"attributes": [{"name": "alt", "value": ""}], "name": "img"}]],
["progressbar", [{"name": "progress"}]],
["radio", [{"attributes": [{"name": "type", "value": "radio"}], "name": "input"}]],
["region", [{"attributes": [{"constraints": ["set"], "name": "aria-label"}], "name": "section"}, {"attributes": [{"constraints": ["set"], "name": "aria-labelledby"}], "name": "section"}]],
Expand Down Expand Up @@ -146,7 +147,7 @@ describe('roleElementMap', function () {
});
describe('spread operator', function () {
it('should have a specific length', function () {
expect([...roleElementMap].length).toEqual(55);
expect([...roleElementMap].length).toEqual(56);
});
test.each([...roleElementMap])('Testing element: %o', (obj, roles) => {
expect(entriesList).toEqual(
Expand Down

0 comments on commit bedb1ea

Please sign in to comment.