Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: check invalid argument error for option
this adds a test for the validateArguments function in TextDecoder
  • Loading branch information
nanomosfet committed Nov 30, 2018
commit 3cf063d502b9fe5dd5216c23cffda8b2d5cb92a6
10 changes: 10 additions & 0 deletions test/parallel/test-whatwg-encoding-textdecoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down