We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8dedf1f commit e173ca1Copy full SHA for e173ca1
test/parallel/test-http2-invalidheaderfield.js
@@ -56,10 +56,10 @@ server.listen(0, common.mustCall(() => {
56
});
57
58
const session4 = http2.connect(`http://localhost:${server.address().port}`);
59
- try {
+ throws(() => {
60
session4.request({ ':test': 123 });
61
- } catch (e) {
62
- strictEqual(e.code, 'ERR_HTTP2_INVALID_PSEUDOHEADER');
63
- session4.destroy();
64
- }
+ }, {
+ code: 'ERR_HTTP2_INVALID_PSEUDOHEADER'
+ });
+ session4.close();
65
}));
0 commit comments