GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: improve code coverage for string decoder · nodejs/node@9ec105c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-string-decoder.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-string-decoder.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-string-decoder.js
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,16 @@ common.expectsError(
161161
}
162162
);
163163

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+
164174
// test verifies that StringDecoder will correctly decode the given input
165175
// buffer with the given encoding to the expected output. It will attempt all
166176
// possible ways to write() the input buffer, see writeSequences(). The

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.