File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -1315,7 +1315,7 @@ class Http2Stream extends Duplex {
1315
1315
id : this [ kID ] ,
1316
1316
state : this . state ,
1317
1317
readableState : this . _readableState ,
1318
- writeableSate : this . _writableState
1318
+ writableState : this . _writableState
1319
1319
} ;
1320
1320
return `Http2Stream ${ util . format ( obj ) } ` ;
1321
1321
}
Original file line number Diff line number Diff line change
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
+ const util = require ( 'util' ) ;
10
+
11
+ const server = http2 . createServer ( ) ;
12
+ server . on ( 'stream' , common . mustCall ( ( stream ) => {
13
+ assert . strictEqual ( stream . aborted , false ) ;
14
+ const insp = util . inspect ( stream ) ;
15
+ assert . ok ( / H t t p 2 S t r e a m { i d / . test ( insp ) ) ;
16
+ assert . ok ( / s t a t e : / . test ( insp ) ) ;
17
+ assert . ok ( / r e a d a b l e S t a t e : / . test ( insp ) ) ;
18
+ assert . ok ( / w r i t a b l e S t a t e : / . test ( insp ) ) ;
19
+ stream . end ( 'ok' ) ;
20
+ } ) ) ;
21
+ server . listen ( 0 , common . mustCall ( ( ) => {
22
+ const client = http2 . connect ( `http://localhost:${ server . address ( ) . port } ` ) ;
23
+ const req = client . request ( ) ;
24
+ req . resume ( ) ;
25
+ req . on ( 'streamClosed' , common . mustCall ( ( ) => {
26
+ client . destroy ( ) ;
27
+ server . close ( ) ;
28
+ } ) ) ;
29
+ } ) ) ;
You can’t perform that action at this time.
0 commit comments