test: add Float16Array to common.getArrayBufferViews()

PR-URL: https://github.com/nodejs/node/pull/58233
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Livia Medeiros 2025-05-10 20:39:27 +09:00 committed by GitHub
parent 578a893f56
commit f8809cef63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -703,6 +703,7 @@ function getArrayBufferViews(buf) {
Uint16Array,
Int32Array,
Uint32Array,
Float16Array,
Float32Array,
Float64Array,
BigInt64Array,

View File

@ -63,7 +63,7 @@ const views = common.getArrayBufferViews(buffer);
assert.strictEqual(chunk.encoding, 'buffer');
res += chunk.chunk;
}
assert.strictEqual(res, 'ABCD'.repeat(9));
assert.strictEqual(res, 'ABCD'.repeat(views.length));
}),
});