Skip to content

Commit fd5af6b

Browse files
nanomosfetBethGriggs
authored andcommittedFeb 12, 2019
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 a2155e1 commit fd5af6b

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
@@ -234,6 +234,16 @@ testDecodeSample(
234234
]
235235
);
236236

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

0 commit comments

Comments
 (0)
Please sign in to comment.