diff --git a/test/parallel/test-whatwg-encoding-textdecoder.js b/test/parallel/test-whatwg-encoding-textdecoder.js index 0a812504f6179e..e1d8575a644490 100644 --- a/test/parallel/test-whatwg-encoding-textdecoder.js +++ b/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',