Skip to content

Commit 8554a4a

Browse files
committed
test: use for...of in test-require-resolve-invalid-paths
Signed-off-by: Raul Garcia <rraulg5@gmail.com>
1 parent 8d514c7 commit 8554a4a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎test/parallel/test-require-resolve-invalid-paths.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ const assert = require('assert');
55

66
// Test invalid `paths` entries: Ensure non-string entries throw an error
77
{
8-
const paths = [1, false, null, undefined, () => {}, {}];
9-
paths.forEach((value) => {
8+
const paths = [1, false, null, undefined, () => { }, {}];
9+
for (const path of paths) {
1010
assert.throws(
11-
() => require.resolve('.', { paths: [value] }),
11+
() => require.resolve('.', { paths: [path] }),
1212
{
1313
name: 'TypeError',
1414
code: 'ERR_INVALID_ARG_TYPE',
1515
}
1616
);
17-
});
17+
}
1818
}

0 commit comments

Comments
 (0)