diff --git a/test/parallel/test-icu-transcode.js b/test/parallel/test-icu-transcode.js index fc588b220f..8e4176547d 100644 --- a/test/parallel/test-icu-transcode.js +++ b/test/parallel/test-icu-transcode.js @@ -70,3 +70,8 @@ assert.deepStrictEqual( buffer.transcode(uint8array, 'latin1', 'utf16le'), Buffer.from('hä', 'utf16le')); } + +{ + const dest = buffer.transcode(new Uint8Array(), 'utf8', 'latin1'); + assert.strictEqual(dest.length, 0); +}