mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00:00
test: replace forEach with for...of in test-fs-realpath-buffer-encoding
PR-URL: https://github.com/nodejs/node/pull/49804 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
1b74aa3cb2
commit
a1693c669c
@ -10,9 +10,9 @@ const buffer_dir = Buffer.from(string_dir);
|
||||
const encodings = ['ascii', 'utf8', 'utf16le', 'ucs2',
|
||||
'base64', 'binary', 'hex'];
|
||||
const expected = {};
|
||||
encodings.forEach((encoding) => {
|
||||
for (const encoding of encodings) {
|
||||
expected[encoding] = buffer_dir.toString(encoding);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// test sync version
|
||||
|
||||
Loading…
Reference in New Issue
Block a user