--- a/test/parallel/test-http2-methods.js
+++ b/test/parallel/test-http2-methods.js
@@ -8,7 +8,7 @@ const h2 = require('http2');
 
 const server = h2.createServer();
 
-const methods = [undefined, 'GET', 'POST', 'PATCH', 'FOO', 'A B C'];
+const methods = ['GET', 'POST', 'PATCH', 'FOO', 'A_B_C'];
 let expected = methods.length;
 
 // We use the lower-level API here
--- a/test/parallel/test-http2-multiplex.js
+++ b/test/parallel/test-http2-multiplex.js
@@ -29,7 +29,7 @@ server.listen(0, common.mustCall(() => {
   });
 
   function doRequest() {
-    const req = client.request({ ':method': 'POST ' });
+    const req = client.request({ ':method': 'POST' });
 
     let data = '';
     req.setEncoding('utf8');
