mirror of https://github.com/grpc/grpc-node.git
Merge pull request #638 from nicolasnoble/backport-632
Backporting #632 to 1.16.x
This commit is contained in:
commit
3eb31cc9a3
|
@ -1,4 +1,5 @@
|
|||
import * as assert from 'assert';
|
||||
import {OutgoingHttpHeaders} from 'http';
|
||||
import * as http2 from 'http2';
|
||||
import {range} from 'lodash';
|
||||
import * as stream from 'stream';
|
||||
|
@ -46,6 +47,9 @@ class ClientHttp2StreamMock extends stream.Duplex implements
|
|||
endAfterHeaders = false;
|
||||
pending = false;
|
||||
rstCode = 0;
|
||||
readonly sentHeaders: OutgoingHttpHeaders = {};
|
||||
readonly sentInfoHeaders?: OutgoingHttpHeaders[] = [];
|
||||
readonly sentTrailers?: OutgoingHttpHeaders = undefined;
|
||||
// tslint:disable:no-any
|
||||
session: http2.Http2Session = {} as any;
|
||||
state: http2.StreamState = {} as any;
|
||||
|
@ -76,6 +80,9 @@ class ClientHttp2StreamMock extends stream.Duplex implements
|
|||
this.emit('write', chunk);
|
||||
cb();
|
||||
}
|
||||
sendTrailers(headers: OutgoingHttpHeaders) {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
describe('CallStream', () => {
|
||||
|
|
Loading…
Reference in New Issue