Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nishasy committed Dec 28, 2024
1 parent f50b20b commit 47dabcf
Showing 1 changed file with 19 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ describe("fetchAriaLabels", () => {
expect(result).toEqual([
{
role: "div",
values: [{name: "label", value: "label1"}],
attributes: [{name: "label", value: "label1"}],
},
{
role: "div",
values: [{name: "label", value: "label2"}],
attributes: [{name: "label", value: "label2"}],
},
]);
});
Expand All @@ -57,11 +57,11 @@ describe("fetchAriaLabels", () => {
expect(result).toEqual([
{
role: "button",
values: [{name: "label", value: "aria-label1"}],
attributes: [{name: "label", value: "aria-label1"}],
},
{
role: "button",
values: [{name: "label", value: "aria-label2"}],
attributes: [{name: "label", value: "aria-label2"}],
},
]);
});
Expand All @@ -84,11 +84,15 @@ describe("fetchAriaLabels", () => {
expect(result).toEqual([
{
role: "div",
values: [{name: "description", value: "description1 content"}],
attributes: [
{name: "description", value: "description1 content"},
],
},
{
role: "div",
values: [{name: "description", value: "description2 content"}],
attributes: [
{name: "description", value: "description2 content"},
],
},
]);
});
Expand All @@ -110,7 +114,7 @@ describe("fetchAriaLabels", () => {
expect(result).toEqual([
{
role: "div",
values: [
attributes: [
{name: "description", value: "description1 content"},
{name: "description", value: "description2 content"},
],
Expand All @@ -134,7 +138,9 @@ describe("fetchAriaLabels", () => {
expect(result).toEqual([
{
role: "div",
values: [{name: "description", value: "description1 content"}],
attributes: [
{name: "description", value: "description1 content"},
],
},
]);
});
Expand Down Expand Up @@ -169,28 +175,28 @@ describe("fetchAriaLabels", () => {
expect(result).toEqual([
{
role: "div",
values: [{name: "label", value: "label-only"}],
attributes: [{name: "label", value: "label-only"}],
},
{
role: "div",
values: [
attributes: [
{name: "description", value: "description-only content "},
],
},
{
role: "img",
values: [{name: "label", value: "label with role"}],
attributes: [{name: "label", value: "label with role"}],
},
{
role: "button",
values: [
attributes: [
{name: "label", value: "aria-label1"},
{name: "description", value: "description1 content"},
],
},
{
role: "button",
values: [
attributes: [
{name: "label", value: "aria-label2"},
{name: "description", value: "description2 content"},
],
Expand Down

0 comments on commit 47dabcf

Please sign in to comment.