Skip to content

Commit 4e2d3cf

Browse files
committed
Add test for Http2ServerRequest/Response object
Add test for Http2ServerRequest/Response object
1 parent dd930ca commit 4e2d3cf

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Flags: --expose-http2
2+
'use strict';
3+
4+
const common = require('../common');
5+
if (!common.hasCrypto)
6+
common.skip('missing crypto');
7+
const assert = require('assert');
8+
const http2 = require('http2');
9+
10+
const {
11+
Http2ServerRequest,
12+
Http2ServerResponse,
13+
} = http2;
14+
15+
const protoRequest = Object.create(Http2ServerRequest.prototype);
16+
const protoResponse = Object.create(Http2ServerResponse.prototype);
17+
18+
assert.strictEqual(protoRequest instanceof Http2ServerRequest, true);
19+
assert.strictEqual(protoResponse instanceof Http2ServerResponse, true);

0 commit comments

Comments
 (0)