Skip to content

Commit 6a56124

Browse files
JPeer264aduh95
authored andcommitted
test: convert .forEach to for...of
Signed-off-by: JPeer264 <jan.peer@sentry.io> PR-URL: #67124 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent c895566 commit 6a56124

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎test/parallel/test-zlib-not-string-or-buffer.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const common = require('../common');
77
const assert = require('assert');
88
const zlib = require('zlib');
99

10-
[
10+
const inputs = [
1111
undefined,
1212
null,
1313
true,
@@ -16,7 +16,9 @@ const zlib = require('zlib');
1616
1,
1717
[1, 2, 3],
1818
{ foo: 'bar' },
19-
].forEach((input) => {
19+
];
20+
21+
for (const input of inputs) {
2022
assert.throws(
2123
() => zlib.deflateSync(input),
2224
{
@@ -27,4 +29,4 @@ const zlib = require('zlib');
2729
common.invalidArgTypeHelper(input)
2830
}
2931
);
30-
});
32+
}

0 commit comments

Comments
 (0)