Skip to content

Commit ed5679c

Browse files
committed
test(websockets): fix expect that does not execute
1 parent 36d5a81 commit ed5679c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/websockets/test/container.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ describe('SocketsContainer', () => {
2121
describe('getSocketEventsHostByPort', () => {
2222
it(`should call "socketEventHosts" get method with expected arguments`, () => {
2323
instance.getSocketEventsHostByPort(port);
24-
expect(getSpy.calledWith({ namespace, port }));
24+
expect(getSpy.calledWith(port.toString())).to.be.true;
2525
});
2626
});
2727
describe('addSocketEventsHost', () => {
2828
it(`should call "socketEventHosts" set method with expected arguments`, () => {
2929
const server = {};
3030
instance.addSocketEventsHost(namespace, port, server as any);
31-
expect(setSpy.calledWith({ namespace, port }, server));
31+
expect(setSpy.calledWith(`${namespace}:${port}`, server)).to.be.true;
3232
});
3333
});
3434
describe('getAllSocketEventHosts', () => {

packages/websockets/test/exceptions/ws-exceptions-handler.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ describe('WsExceptionsHandler', () => {
6767
expect((handler as any).filters).to.be.eql(filters);
6868
});
6969
it('should throws exception when passed argument is not an array', () => {
70-
expect(() => handler.setCustomFilters(null)).to.throw;
70+
expect(() => handler.setCustomFilters(null)).to.throw();
7171
});
7272
});
7373
describe('invokeCustomFilters', () => {

0 commit comments

Comments
 (0)