diff --git a/test/parallel/test-whatwg-encoding-textdecoder.js b/test/parallel/test-whatwg-encoding-textdecoder.js index 531368f0b731d2..9d8ae335f1497f 100644 --- a/test/parallel/test-whatwg-encoding-textdecoder.js +++ b/test/parallel/test-whatwg-encoding-textdecoder.js @@ -234,6 +234,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',