diff options
Diffstat (limited to 'test/parallel/test-http2-server-http1-client.js')
-rw-r--r-- | test/parallel/test-http2-server-http1-client.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/parallel/test-http2-server-http1-client.js b/test/parallel/test-http2-server-http1-client.js new file mode 100644 index 0000000000..ef3a79c0fd --- /dev/null +++ b/test/parallel/test-http2-server-http1-client.js @@ -0,0 +1,22 @@ +'use strict'; + +const common = require('../common'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +const http = require('http'); +const http2 = require('http2'); + +const server = http2.createServer(); +server.on('stream', common.mustNotCall()); +server.on('session', common.mustCall((session) => { + session.on('close', common.mustCall()); +})); + +server.listen(0, common.mustCall(() => { + const req = http.get(`http://localhost:${server.address().port}`); + req.on('error', (error) => { + server.close(); + }); +})); |