Skip to content

Commit

Permalink
test: replace forEach with for of
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrWu committed Sep 23, 2023
1 parent e329a11 commit 603bde8
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 603bde8

Please sign in to comment.