summaryrefslogtreecommitdiff
path: root/test/parallel/test-string-decoder.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-string-decoder.js')
-rw-r--r--test/parallel/test-string-decoder.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/parallel/test-string-decoder.js b/test/parallel/test-string-decoder.js
index 9d1fe69a25..21a0b6c3e3 100644
--- a/test/parallel/test-string-decoder.js
+++ b/test/parallel/test-string-decoder.js
@@ -128,6 +128,10 @@ assert.strictEqual(decoder.write(Buffer.from('3DD8', 'hex')), '');
assert.strictEqual(decoder.write(Buffer.from('4D', 'hex')), '');
assert.strictEqual(decoder.end(), '\ud83d');
+decoder = new StringDecoder('utf16le');
+assert.strictEqual(decoder.write(Buffer.from('3DD84D', 'hex')), '\ud83d');
+assert.strictEqual(decoder.end(), '');
+
common.expectsError(
() => new StringDecoder(1),
{