We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e7deb7 commit 9ec105cCopy full SHA for 9ec105c
test/parallel/test-string-decoder.js
@@ -161,6 +161,16 @@ common.expectsError(
161
}
162
);
163
164
+common.expectsError(
165
+ () => new StringDecoder('utf8').write(null),
166
+ {
167
+ code: 'ERR_INVALID_ARG_TYPE',
168
+ type: TypeError,
169
+ message: 'The "buf" argument must be one of type Buffer, Uint8Array, or' +
170
+ ' ArrayBufferView. Received type object'
171
+ }
172
+);
173
+
174
// test verifies that StringDecoder will correctly decode the given input
175
// buffer with the given encoding to the expected output. It will attempt all
176
// possible ways to write() the input buffer, see writeSequences(). The
0 commit comments