We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 89fe60a commit 3984bc9Copy full SHA for 3984bc9
1 file changed
packages/microservices/test/server/server-grpc.spec.ts
@@ -149,12 +149,18 @@ describe('ServerGrpc', () => {
149
});
150
describe('on call', () => {
151
it('should call native method', async () => {
152
- const call = { write: sinon.spy(), end: sinon.spy() };
+ const call = {
153
+ write: sinon.spy(),
154
+ end: sinon.spy(),
155
+ addListener: sinon.spy(),
156
+ removeListener: sinon.spy(),
157
+ };
158
const callback = sinon.spy();
159
const native = sinon.spy();
160
161
await server.createStreamServiceMethod(native)(call, callback);
162
expect(native.called).to.be.true;
163
+ expect(call.addListener.calledWith('cancelled')).to.be.true;
164
165
166
0 commit comments