Skip to content

Commit 3984bc9

Browse files
author
Michael Mrowetz
committed
fix(tests) fix the grpc tests
1 parent 89fe60a commit 3984bc9

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/microservices/test/server/server-grpc.spec.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,18 @@ describe('ServerGrpc', () => {
149149
});
150150
describe('on call', () => {
151151
it('should call native method', async () => {
152-
const call = { write: sinon.spy(), end: sinon.spy() };
152+
const call = {
153+
write: sinon.spy(),
154+
end: sinon.spy(),
155+
addListener: sinon.spy(),
156+
removeListener: sinon.spy(),
157+
};
153158
const callback = sinon.spy();
154159
const native = sinon.spy();
155160

156161
await server.createStreamServiceMethod(native)(call, callback);
157162
expect(native.called).to.be.true;
163+
expect(call.addListener.calledWith('cancelled')).to.be.true;
158164
});
159165
});
160166
});

0 commit comments

Comments
 (0)