Skip to content

Commit b2a98b1

Browse files
author
Anjana Ramji
committed
test: Refactor ForEach and destructure the code
1 parent e329a11 commit b2a98b1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/parallel/test-url-domain-ascii-unicode.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ const domainWithASCII = [
2121
['भारत.org', 'xn--h2brj9c.org'],
2222
];
2323

24-
domainWithASCII.forEach((pair) => {
25-
const domain = pair[0];
26-
const ascii = pair[1];
24+
for (const [domain, ascii] of domainWithASCII) {
2725
const domainConvertedToASCII = domainToASCII(domain);
2826
strictEqual(domainConvertedToASCII, ascii);
2927
const asciiConvertedToUnicode = domainToUnicode(ascii);
3028
strictEqual(asciiConvertedToUnicode, domain);
31-
});
29+
}

0 commit comments

Comments
 (0)