★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/7577e754bbNouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files
test: check invalid argument error for option
This commit adds a test for the validateArguments function in
TextDecoder.

PR-URL: #24736
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
nanomosfet authored and BridgeAR committed Dec 5, 2018
1 parent 2916b59 commit 7577e754bb83c295897a1f115cad956018e26d97
Showing with 10 additions and 0 deletions.
  1. +10 −0 test/parallel/test-whatwg-encoding-textdecoder.js
@@ -233,6 +233,16 @@ testDecodeSample(
]
);

{
common.expectsError(
() => new TextDecoder('utf-8', 1),
{
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError
}
);
}

// From: https://github.com/w3c/web-platform-tests/blob/master/encoding/api-invalid-label.html
[
'utf-8',

0 comments on commit 7577e75

Please sign in to comment.