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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
CorrWu committed Nov 10, 2023
1 parent 89c66ae commit a5a6fef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-buffer-slice.js
Original file line number Diff line number Diff line change
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 a5a6fef

Please sign in to comment.