| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1e7deb7 commit 9ec105c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -161,6 +161,16 @@ common.expectsError( | |||
| 161 | 161 | } | |
| 162 | 162 | ); | |
| 163 | 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 | + | ||
| 164 | 174 | // test verifies that StringDecoder will correctly decode the given input | |
| 165 | 175 | // buffer with the given encoding to the expected output. It will attempt all | |
| 166 | 176 | // possible ways to write() the input buffer, see writeSequences(). The | |
| Back | FazBrowse Home | New Git URL |
0 commit comments