Skip to content

Commit 7577e75

Browse files
nanomosfetBridgeAR
authored andcommitted
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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 2916b59 commit 7577e75

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

+10
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,16 @@ testDecodeSample(
233233
]
234234
);
235235

236+
{
237+
common.expectsError(
238+
() => new TextDecoder('utf-8', 1),
239+
{
240+
code: 'ERR_INVALID_ARG_TYPE',
241+
type: TypeError
242+
}
243+
);
244+
}
245+
236246
// From: https://github.com/w3c/web-platform-tests/blob/master/encoding/api-invalid-label.html
237247
[
238248
'utf-8',

0 commit comments

Comments
 (0)