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 test coverage for WHATWG `TextDecoder` · nodejs/node@bbf9da8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-whatwg-encoding-custom-textdecoder.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-whatwg-encoding-custom-textdecoder.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-encoding-custom-textdecoder.js
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,19 @@ assert(TextDecoder);
5151
});
5252
}
5353

54+
// Invalid encoders
55+
{
56+
['meow', 'nonunicode', 'foo', 'bar'].forEach((fakeEncoding) => {
57+
assert.throws(
58+
() => { new TextDecoder(fakeEncoding); },
59+
{
60+
code: 'ERR_ENCODING_NOT_SUPPORTED',
61+
name: 'RangeError'
62+
}
63+
);
64+
});
65+
}
66+
5467
// Test TextDecoder, UTF-8, fatal: true, ignoreBOM: false
5568
if (common.hasIntl) {
5669
['unicode-1-1-utf-8', 'utf8', 'utf-8'].forEach((i) => {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — 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.