diff options
author | Masashi Hirano <cherrydog07@gmail.com> | 2018-06-01 23:02:13 +0900 |
---|---|---|
committer | Lance Ball <lball@redhat.com> | 2018-06-04 10:37:46 -0400 |
commit | 42adb65d2f350e5b553c25ef8543fabe5cf9688b (patch) | |
tree | 732adef54107428177caa4ee1ad7d91bbd892fc3 /test | |
parent | 41843e23f260eccf1e4a3be8ed9e429fa4b87ea5 (diff) | |
download | android-node-v8-42adb65d2f350e5b553c25ef8543fabe5cf9688b.tar.gz android-node-v8-42adb65d2f350e5b553c25ef8543fabe5cf9688b.tar.bz2 android-node-v8-42adb65d2f350e5b553c25ef8543fabe5cf9688b.zip |
test: string-decorater.lastChar
Added test for string-decorater.lastChar to improve coverage.
PR-URL: https://github.com/nodejs/node/pull/21084
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Lance Ball <lball@redhat.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-string-decoder.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-string-decoder.js b/test/parallel/test-string-decoder.js index 0e7ea8ffdd..fafab97b2d 100644 --- a/test/parallel/test-string-decoder.js +++ b/test/parallel/test-string-decoder.js @@ -90,7 +90,8 @@ test('utf16le', Buffer.from('3DD84DDC', 'hex'), '\ud83d\udc4d'); // thumbs up decoder = new StringDecoder('utf8'); assert.strictEqual(decoder.write(Buffer.from('E1', 'hex')), ''); -// A quick test for lastNeed & lastTotal which are undocumented. +// A quick test for lastChar, lastNeed & lastTotal which are undocumented. +assert(decoder.lastChar.equals(new Uint8Array([0xe1, 0, 0, 0]))); assert.strictEqual(decoder.lastNeed, 2); assert.strictEqual(decoder.lastTotal, 3); |