Skip to content

Commit dbc0d47

Browse files
committed
Rewrite test to use describe.each instead of Array.prototype.forEach
simple-icons/simple-icons-website@acab35f
1 parent d243055 commit dbc0d47

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tests/e2e.test.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,16 @@ describe('External links', () => {
9696
await page.goto(url.href);
9797
});
9898

99-
const menuLinksTitles = [
99+
describe.each([
100100
'repository',
101101
'SimpleIcons',
102102
'Shields.io',
103103
'Legal disclaimer',
104-
];
105-
106-
menuLinksTitles.forEach((title) =>
104+
])(`is possible to click menu links`, (title) => {
107105
it(`is possible to click the link for ${title}`, async () => {
108-
await expect(page).toClick('a', { title });
109-
}),
110-
);
106+
await expect(page).toClick(`a[title="${title}"]`);
107+
});
108+
});
111109
});
112110

113111
describe('Search', () => {

0 commit comments

Comments
 (0)