diff --git a/test/parallel/test-zlib-not-string-or-buffer.js b/test/parallel/test-zlib-not-string-or-buffer.js index a0954a0e1ea..54f4b08cace 100644 --- a/test/parallel/test-zlib-not-string-or-buffer.js +++ b/test/parallel/test-zlib-not-string-or-buffer.js @@ -7,7 +7,7 @@ const common = require('../common'); const assert = require('assert'); const zlib = require('zlib'); -[ +const inputs = [ undefined, null, true, @@ -16,7 +16,9 @@ const zlib = require('zlib'); 1, [1, 2, 3], { foo: 'bar' }, -].forEach((input) => { +]; + +for (const input of inputs) { assert.throws( () => zlib.deflateSync(input), { @@ -27,4 +29,4 @@ const zlib = require('zlib'); common.invalidArgTypeHelper(input) } ); -}); +}