diff --git a/test/parallel/test-http2-cookies.js b/test/parallel/test-http2-cookies.js index 3e20a5749dd638..b2f0a3bf6c25cc 100644 --- a/test/parallel/test-http2-cookies.js +++ b/test/parallel/test-http2-cookies.js @@ -11,7 +11,8 @@ const server = h2.createServer(); const setCookie = [ 'a=b', - 'c=d; Wed, 21 Oct 2015 07:28:00 GMT; Secure; HttpOnly' + 'c=d; Wed, 21 Oct 2015 07:28:00 GMT; Secure; HttpOnly', + 'e=f' ]; // we use the lower-level API here diff --git a/test/parallel/test-http2-util-headers-list.js b/test/parallel/test-http2-util-headers-list.js index 8d665120c14776..7e6bb7ece205bc 100644 --- a/test/parallel/test-http2-util-headers-list.js +++ b/test/parallel/test-http2-util-headers-list.js @@ -261,4 +261,10 @@ const regex = })(mapToHeaders({ [name]: 'abc' })); }); +common.expectsError({ + code: 'ERR_HTTP2_INVALID_CONNECTION_HEADERS', + message: regex +})(mapToHeaders({ [HTTP2_HEADER_TE]: ['abc'] })); + assert(!(mapToHeaders({ te: 'trailers' }) instanceof Error)); +assert(!(mapToHeaders({ te: ['trailers'] }) instanceof Error));