Skip to content

Commit

Permalink
test: replace forEach with for of
Browse files Browse the repository at this point in the history
PR-URL: #49785
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
CorrWu authored and UlisesGascon committed Dec 11, 2023
1 parent 32d65c0 commit 03ba28f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-buffer-slice.js
Expand Up @@ -71,9 +71,9 @@ for (let i = 0, s = buf.toString(); i < buf.length; ++i) {
);
}

expectedSameBufs.forEach(([buf1, buf2]) => {
for (const [buf1, buf2] of expectedSameBufs) {
assert.strictEqual(Buffer.compare(buf1, buf2), 0);
});
}

const utf16Buf = Buffer.from('0123456789', 'utf16le');
assert.deepStrictEqual(utf16Buf.slice(0, 6), Buffer.from('012', 'utf16le'));
Expand Down

0 comments on commit 03ba28f

Please sign in to comment.